From 0cd58c235cd1e7ae278e1e7e4b30322855bc9906 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Wed, 22 Jul 2026 13:38:22 -0700 Subject: [PATCH 01/17] revert 790 --- scripts/GenerateMarkDown.ps1 | 177 +++++++---------------------------- 1 file changed, 33 insertions(+), 144 deletions(-) diff --git a/scripts/GenerateMarkDown.ps1 b/scripts/GenerateMarkDown.ps1 index 52498f065e01d..d7fd5d244a5ea 100644 --- a/scripts/GenerateMarkDown.ps1 +++ b/scripts/GenerateMarkDown.ps1 @@ -13,36 +13,6 @@ function Get-GraphMapping { $graphMapping.Add("beta", "graph-powershell-beta") return $graphMapping } - -function Get-NormalizedContent { - param ( - [ValidateNotNullOrEmpty()] - [string] $FilePath - ) - $content = Get-Content $FilePath -Raw - # Normalize line endings to LF and trim trailing whitespace - $content = $content -replace "`r`n", "`n" - $content = $content.TrimEnd() - # Strip ms.date line so date-only changes are ignored during comparison - $content = $content -replace '(?m)^ms\.date: .+$', '' - return $content -} - -function Get-DeterministicGuid { - param ( - [ValidateNotNullOrEmpty()] - [string] $InputString - ) - $bytes = [System.Text.Encoding]::UTF8.GetBytes($InputString) - $sha256 = [System.Security.Cryptography.SHA256]::Create() - try { - $hash = $sha256.ComputeHash($bytes) - return [guid]::new([byte[]]$hash[0..15]).ToString() - } finally { - $sha256.Dispose() - } -} - function Set-Help { param ( [ValidateNotNullOrEmpty()] @@ -86,11 +56,10 @@ function Start-GraphHelp { $ModulePrefix = "Microsoft.Graph" $AuthPath = "$ModulePrefix.Authentication" $AuthDestination = Join-Path $WorkLoadDocsPath "graph-powershell-1.0" $AuthPath + Get-ChildItem -Path $AuthDestination * -File -Recurse | foreach { $_.Delete() } Import-Module Microsoft.Graph.Authentication -Global $GraphMapping = Get-GraphMapping - $TempAuthDir = Join-Path ([System.IO.Path]::GetTempPath()) "GraphDocsTempAuth_$([guid]::NewGuid().ToString('N'))" - New-Item -Path $TempAuthDir -ItemType Directory -Force | Out-Null $GraphMapping.Keys | ForEach-Object { $graphProfile = $_ $profilePath = "graph-powershell-1.0" @@ -98,34 +67,10 @@ function Start-GraphHelp { $profilePath = "graph-powershell-beta" } - # Generate all auth module docs to temp directory using module-level generation - Set-Help -ModuleDocsPath $TempAuthDir -Command "Connect-MgGraph" -Module "Microsoft.Graph.Authentication" - - # Compare and copy all generated auth files - $TempAuthModuleDir = Join-Path $TempAuthDir $AuthPath - if (Test-Path $TempAuthModuleDir) { - if (-not (Test-Path $AuthDestination)) { - New-Item -Path $AuthDestination -ItemType Directory -Force | Out-Null - } - Get-ChildItem -Path $TempAuthModuleDir -Filter "*.md" -File | ForEach-Object { - $tempFile = $_.FullName - $existingFile = Join-Path $AuthDestination $_.Name - if (Test-Path $existingFile) { - $existingContent = Get-NormalizedContent -FilePath $existingFile - $newContent = Get-NormalizedContent -FilePath $tempFile - if ($existingContent -ne $newContent) { - Copy-Item -Path $tempFile -Destination $existingFile -Force - Write-Host "Updated auth doc: $($_.BaseName)" - } - } else { - Copy-Item -Path $tempFile -Destination $existingFile -Force - Write-Host "Added auth doc: $($_.BaseName)" - } - } - } + $AuthenticationDocsPath = Join-Path $PSScriptRoot "..\microsoftgraph\graph-powershell-1.0" + Set-Help -ModuleDocsPath $AuthenticationDocsPath -Command "Connect-MgGraph" -Module "Microsoft.Graph.Authentication" Get-FolderByProfile -GraphProfile $graphProfile -GraphProfilePath $profilePath -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate } - Remove-Item -Path $TempAuthDir -Recurse -Force -ErrorAction SilentlyContinue git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . @@ -144,11 +89,7 @@ function Get-FolderByProfile { $ModulesToGenerate = @() ) $CommandMetadataContent = Get-Content $CmdletMetadataPath | ConvertFrom-Json - - # Create a single temp directory for this profile's generation - $TempOutputDir = Join-Path ([System.IO.Path]::GetTempPath()) "GraphDocsTemp_$([guid]::NewGuid().ToString('N'))" - New-Item -Path $TempOutputDir -ItemType Directory -Force | Out-Null - + $ModulesToGenerate | ForEach-Object { $ModuleName = $_ Write-Host $ModuleName @@ -163,104 +104,52 @@ function Get-FolderByProfile { if (-not(Test-Path $Destination)) { New-Item -Path $Destination -ItemType Directory } - + + Get-ChildItem -Path $Destination * -File -Recurse | foreach { $_.Delete() } $CmdletCount = 0 - $MetadataCommands = @{} - - # Generate table of contents for each module using a deterministic GUID + # Generate table of contents for each module $TocFileName = "$Path.md" - $ModuleGuid = Get-DeterministicGuid -InputString $Path + $ModuleGuid = [guid]::NewGuid().ToString() $LinkProfile = $GraphProfile.Replace("v", "") $LinkModuleName = $Path.ToLower() $HelpVersion = "1.0.0.0" $HelpLocale = "en-US" - $DownloadLink = "https://learn.microsoft.com/en-us/powershell/module/$LinkModuleName/?view=graph-powershell-$LinkProfile" - - # Build TOC content in memory to compare before writing - $TocContent = @() - $TocContent += "---" - $TocContent += "Module Name: $Path" - $TocContent += "Module Guid: $ModuleGuid" - $TocContent += "Download Help Link: $DownloadLink" - $TocContent += "Help Version: $HelpVersion" - $TocContent += "Locale: $HelpLocale" - $TocContent += "---" - $TocContent += "" - $TocContent += "# $Path Module" - $TocContent += "## Description" - $TocContent += "Microsoft Graph PowerShell Cmdlets" - $TocContent += "" - $TocContent += "## $Path Cmdlets" - + $DownloadLink = "https://learn.microsoft.com/en-us/powershell/module/$LinkModuleName/?view=graph-powershell-$LinkProfile" + New-Item -Path $Destination -Name $TocFileName -ItemType File -Force + Add-Content -Path $Destination\$TocFileName -Value "---" + Add-Content -Path $Destination\$TocFileName -Value "Module Name: $Path" + Add-Content -Path $Destination\$TocFileName -Value "Module Guid: $ModuleGuid" + Add-Content -Path $Destination\$TocFileName -Value "Download Help Link: $DownloadLink" + Add-Content -Path $Destination\$TocFileName -Value "Help Version: $HelpVersion" + Add-Content -Path $Destination\$TocFileName -Value "Locale: $HelpLocale" + Add-Content -Path $Destination\$TocFileName -Value "---" + Add-Content -Path $Destination\$TocFileName -Value "" + Add-Content -Path $Destination\$TocFileName -Value "# $Path Module" + Add-Content -Path $Destination\$TocFileName -Value "## Description" + Add-Content -Path $Destination\$TocFileName -Value "Microsoft Graph PowerShell Cmdlets" + Add-Content -Path $Destination\$TocFileName -Value "" + Add-Content -Path $Destination\$TocFileName -Value "## $Path Cmdlets" $CommandMetadataContent | Where-Object { $_.Module -eq $ModName -and $_.ApiVersion -eq $GraphProfile } | ForEach-Object { $Command = $_.Command - $MetadataCommands[$Command] = $true $CmdletDocsPath = Join-Path $WorkLoadDocsPath $GraphProfilePath $Path "$Command.md" - - # Generate to temp directory and compare with existing - if (Get-Command -Name $Command -ErrorAction SilentlyContinue) { - Set-Help -ModuleDocsPath $TempOutputDir -Command $Command -Module $Path - $TempFilePath = Join-Path $TempOutputDir $Path "$Command.md" - if (Test-Path $TempFilePath) { - if (Test-Path $CmdletDocsPath) { - $existingContent = Get-NormalizedContent -FilePath $CmdletDocsPath - $newContent = Get-NormalizedContent -FilePath $TempFilePath - if ($existingContent -ne $newContent) { - Copy-Item -Path $TempFilePath -Destination $CmdletDocsPath -Force - Write-Host "Updated: $Command" - } - } else { - Copy-Item -Path $TempFilePath -Destination $CmdletDocsPath -Force - Write-Host "Added: $Command" - } + if (-not(Test-Path $CmdletDocsPath)) { + if (Get-Command -Name $Command -ErrorAction SilentlyContinue) { + Set-Help -ModuleDocsPath $DocsDestination -Command $Command -Module $Path + } else { + Write-Warning "Cmdlet $Command is not available." } - } elseif (-not (Test-Path $CmdletDocsPath)) { - Write-Warning "Cmdlet $Command is not available." + } - - $TocContent += "### [$Command]($Command.md)" - $TocContent += "" + Add-Content -Path $Destination\$TocFileName -Value "### [$Command]($Command.md)" + Add-Content -Path $Destination\$TocFileName -Value "" $CmdletCount++ } - - if ($CmdletCount -eq 0) { + if($CmdletCount -eq 0){ Remove-Item -LiteralPath $Destination -Force -Recurse - } else { - # Only write TOC if content has changed - $TocFilePath = Join-Path $Destination $TocFileName - $newTocText = ($TocContent -join "`r`n") + "`r`n" - if (Test-Path $TocFilePath) { - $existingTocText = Get-Content $TocFilePath -Raw - # Normalize both to LF for comparison - $existingNormalized = $existingTocText -replace "`r`n", "`n" - $newNormalized = $newTocText -replace "`r`n", "`n" - if ($existingNormalized.TrimEnd() -ne $newNormalized.TrimEnd()) { - $newTocText | Out-File $TocFilePath -Encoding UTF8 -NoNewline - Write-Host "Updated TOC: $TocFileName" - } - } else { - $newTocText | Out-File $TocFilePath -Encoding UTF8 -NoNewline - Write-Host "Added TOC: $TocFileName" - } - - # Remove orphaned docs — files for commands no longer in metadata - Get-ChildItem -Path $Destination -Filter "*.md" -File | Where-Object { - $cmdName = $_.BaseName - -not $MetadataCommands.ContainsKey($cmdName) -and $_.Name -ne $TocFileName - } | ForEach-Object { - Write-Host "Removing orphaned doc: $($_.Name)" - Remove-Item $_.FullName -Force - } } - # Clean up temp module folder for this iteration - $TempModuleDir = Join-Path $TempOutputDir $Path - if (Test-Path $TempModuleDir) { - Remove-Item -Path $TempModuleDir -Recurse -Force -ErrorAction SilentlyContinue - } } - - Remove-Item -Path $TempOutputDir -Recurse -Force -ErrorAction SilentlyContinue + } # Install PlatyPS Install-Module -Name Microsoft.PowerShell.PlatyPS -Force From e6db7aca807cfefd0501cd38834b6fa3f6728b39 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Wed, 22 Jul 2026 13:43:12 -0700 Subject: [PATCH 02/17] remove stabilize msdate from pipeline --- azure-pipelines/powershell-docs.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/azure-pipelines/powershell-docs.yml b/azure-pipelines/powershell-docs.yml index c0304ad79ada1..603004858ab45 100644 --- a/azure-pipelines/powershell-docs.yml +++ b/azure-pipelines/powershell-docs.yml @@ -158,14 +158,6 @@ extends: targetType: 'filePath' pwsh: true filePath: scripts/CorrectRelatedLinks-AllFiles.ps1 - - task: PowerShell@2 - displayName: 'Stabilize ms.date values' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/StabilizeMsDate.ps1 - errorActionPreference: 'stop' - task: AzureKeyVault@2 displayName: "Azure Key Vault: Get GitHub App secrets" inputs: From 73a8c601468325d6a6906f1c357449e9cc7d5eba Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 24 Jul 2026 02:01:17 -0700 Subject: [PATCH 03/17] Prevent mass doc deletion when Graph modules fail to load Guard GenerateMarkDown.ps1 so a module's docs are only deleted when the module is available to regenerate them. Skip-and-preserve per workload module, and abort if Authentication is unavailable, avoiding refresh PRs that delete thousands of docs after a failed module install. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- scripts/GenerateMarkDown.ps1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/GenerateMarkDown.ps1 b/scripts/GenerateMarkDown.ps1 index d7fd5d244a5ea..8c4b03f16ddf8 100644 --- a/scripts/GenerateMarkDown.ps1 +++ b/scripts/GenerateMarkDown.ps1 @@ -56,9 +56,15 @@ function Start-GraphHelp { $ModulePrefix = "Microsoft.Graph" $AuthPath = "$ModulePrefix.Authentication" $AuthDestination = Join-Path $WorkLoadDocsPath "graph-powershell-1.0" $AuthPath + + # Guard against catastrophic deletions: never remove existing docs unless the module + # is available to regenerate them. Authentication is required for every run, so abort + # if it failed to install rather than wiping committed documentation. + if (-not (Get-Module -Name Microsoft.Graph.Authentication -ListAvailable -ErrorAction SilentlyContinue)) { + throw "Microsoft.Graph.Authentication module is not available. Aborting generation to avoid deleting existing documentation." + } + Import-Module Microsoft.Graph.Authentication -Force -Global Get-ChildItem -Path $AuthDestination * -File -Recurse | foreach { $_.Delete() } - - Import-Module Microsoft.Graph.Authentication -Global $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { $graphProfile = $_ @@ -101,6 +107,16 @@ function Get-FolderByProfile { } $Destination = Join-Path $WorkLoadDocsPath $GraphProfilePath $Path $DocsDestination = Join-Path $WorkLoadDocsPath $GraphProfilePath + + # Guard against catastrophic deletions: if the module failed to install/import, + # skip it entirely so its committed docs are preserved instead of being deleted + # and never regenerated (which is what produced the mass-deletion refresh PRs). + if (-not (Get-Module -Name $Path -ListAvailable -ErrorAction SilentlyContinue)) { + Write-Warning "Module $Path is not available; skipping to preserve existing documentation." + return + } + Import-Module $Path -Force -Global -ErrorAction SilentlyContinue + if (-not(Test-Path $Destination)) { New-Item -Path $Destination -ItemType Directory } From 07657def287d803ad342c41d6f0061804d49781b Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 24 Jul 2026 02:09:19 -0700 Subject: [PATCH 04/17] Normalize generated-commit author to Graph DevX Tooling bot EscapeDisallowedHtmlTags.ps1 and RemoveInvalidFullStops.ps1 hardcoded a personal git identity, so their stage commits in the weekly refresh PRs were attributed to an individual instead of the tooling bot. Align both with the other generation scripts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- scripts/EscapeDisallowedHtmlTags.ps1 | 4 ++-- scripts/RemoveInvalidFullStops.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/EscapeDisallowedHtmlTags.ps1 b/scripts/EscapeDisallowedHtmlTags.ps1 index 7f2d4079ff9da..597d7a5633f81 100644 --- a/scripts/EscapeDisallowedHtmlTags.ps1 +++ b/scripts/EscapeDisallowedHtmlTags.ps1 @@ -23,8 +23,8 @@ function EscapeDisallowedHtmlTags { Get-FilesByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate } - git config --global user.email "timwamalwa@gmail.com" - git config --global user.name "Timothy Wamalwa" + git config --global user.email "GraphTooling@service.microsoft.com" + git config --global user.name "Microsoft Graph DevX Tooling" git add . git commit -m "Escaped disallowed html tags" } diff --git a/scripts/RemoveInvalidFullStops.ps1 b/scripts/RemoveInvalidFullStops.ps1 index 37be47e7c73df..db34789d58025 100644 --- a/scripts/RemoveInvalidFullStops.ps1 +++ b/scripts/RemoveInvalidFullStops.ps1 @@ -23,8 +23,8 @@ function Remove-InvalidFullStops { Get-FilesByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate } - git config --global user.email "timwamalwa@gmail.com" - git config --global user.name "Timothy Wamalwa" + git config --global user.email "GraphTooling@service.microsoft.com" + git config --global user.name "Microsoft Graph DevX Tooling" git add . git commit -m "Removed invalid full stops from the beginning of lines" } From 29c4a42a5ee11cabad11dfec978623090f64c623 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 28 Jul 2026 11:36:40 -0700 Subject: [PATCH 05/17] Fix duplicated doc enrichment blocks and BOM churn in generation - UpdateLinks.ps1: only insert the beta/v1 '[!NOTE]' link when it is not already present, so weekly runs stop stacking duplicate note blocks. - GeneratePermissionsTable.ps1: skip files that already contain a '**Permissions**' table instead of prepending another copy each run. - GenerateMarkDown.ps1: write PlatyPS output as UTF-8 without BOM so every regenerated file no longer diffs on a leading BOM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- scripts/GenerateMarkDown.ps1 | 4 ++-- scripts/GeneratePermissionsTable.ps1 | 7 ++++++- scripts/UpdateLinks.ps1 | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/GenerateMarkDown.ps1 b/scripts/GenerateMarkDown.ps1 index 8c4b03f16ddf8..3aaae05dc9f8d 100644 --- a/scripts/GenerateMarkDown.ps1 +++ b/scripts/GenerateMarkDown.ps1 @@ -27,7 +27,7 @@ function Set-Help { Command = (Get-Command $Command) OutputFolder = $ModuleDocsPath Force = $true - Encoding = [System.Text.Encoding]::UTF8 + Encoding = [System.Text.UTF8Encoding]::new($false) } if ($Module -eq "Microsoft.Graph.Authentication") { @@ -35,7 +35,7 @@ function Set-Help { Module = (Get-Module $Module) OutputFolder = $ModuleDocsPath WithModulePage = $true - Encoding = [System.Text.Encoding]::UTF8 + Encoding = [System.Text.UTF8Encoding]::new($false) } Import-Module $Module -Force -Global } diff --git a/scripts/GeneratePermissionsTable.ps1 b/scripts/GeneratePermissionsTable.ps1 index aeca973f7f228..47e90ae3698f8 100644 --- a/scripts/GeneratePermissionsTable.ps1 +++ b/scripts/GeneratePermissionsTable.ps1 @@ -136,7 +136,12 @@ function New-ReferenceTable { "@; - if ((Get-Content -Raw -Path $File) -match '(## DESCRIPTION)[\s\S]*## EXAMPLES') { + if ((Get-Content -Raw -Path $File) -match '\*\*Permissions\*\*') { + # A permissions table has already been inserted on a previous run. + # Skip to avoid prepending a duplicate '**Permissions**' block. + Write-Host "Skipping $CommandName as it already has a permissions table"; + } + elseif ((Get-Content -Raw -Path $File) -match '(## DESCRIPTION)[\s\S]*## EXAMPLES') { $Link = "**Permissions**`r`n`n$markdownTable`r`n`n## EXAMPLES" (Get-Content $File) | Foreach-Object { $_ -replace '## EXAMPLES', $Link } | diff --git a/scripts/UpdateLinks.ps1 b/scripts/UpdateLinks.ps1 index f7edf3e93bcd6..fcc8d8e2253b2 100644 --- a/scripts/UpdateLinks.ps1 +++ b/scripts/UpdateLinks.ps1 @@ -175,7 +175,11 @@ function Add-Link { $Folder = $View.Split("=")[1] $ConfirmFile = Join-Path $WorkLoadDocsPath "$Folder" "$ModuleName" "$CommandRename.md" $ConfirmCommandAvailability = Find-MgGraphCommand -Command $CommandRename - if ($ConfirmCommandAvailability -and (Test-Path $ConfirmFile)) { + # Only insert the note if it isn't already present, otherwise every run + # prepends another copy of the same '[!NOTE]' block before '## SYNTAX'. + $NoteMarker = "$LinkTitle [$CommandRename]($BaseUrl/$FullModuleName$View)" + $AlreadyLinked = (Get-Content -Raw -Path $File) -match [regex]::Escape($NoteMarker) + if ($ConfirmCommandAvailability -and (Test-Path $ConfirmFile) -and -not $AlreadyLinked) { (Get-Content $File) | Foreach-Object { $_ -replace '## SYNTAX', $Link } | Out-File $File From a94085a9f3a84c441f3ed86dc5714407d8654618 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 28 Jul 2026 12:15:46 -0700 Subject: [PATCH 06/17] Force LF line endings for generated markdown docs Add '*.md text eol=lf' to .gitattributes so PlatyPS/transform scripts, which run on Windows and emit CRLF, no longer produce line-ending churn in the weekly refresh PRs. Index blobs are already LF, so this only pins the working-tree checkout and future writes to LF. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitattributes b/.gitattributes index 9fb85ec49f011..ff067eed84e37 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,10 @@ # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf +# Reference docs are generated by PlatyPS/transform scripts on Windows. +# Force LF so regenerated markdown never churns the diff with CRLF endings. +*.md text eol=lf + # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary \ No newline at end of file From 19a3a1a450a7ffe97d24ef506837f842c15293e7 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Wed, 29 Jul 2026 11:57:43 -0700 Subject: [PATCH 07/17] Prevent mass doc deletion by overwriting in place and removing only orphans Bulk-deleting a module's docs before regenerating meant any transient import failure (installed but unimportable module, e.g. Authentication version conflict) wiped docs that were never regenerated, producing refresh PRs with thousands of missing files. Now: verify the module truly imports and exposes commands before processing (skip-and-preserve otherwise), overwrite each doc in place, and remove only genuine orphans whose command is no longer in the metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- scripts/GenerateMarkDown.ps1 | 56 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/scripts/GenerateMarkDown.ps1 b/scripts/GenerateMarkDown.ps1 index 3aaae05dc9f8d..0d5a062bef429 100644 --- a/scripts/GenerateMarkDown.ps1 +++ b/scripts/GenerateMarkDown.ps1 @@ -63,7 +63,7 @@ function Start-GraphHelp { if (-not (Get-Module -Name Microsoft.Graph.Authentication -ListAvailable -ErrorAction SilentlyContinue)) { throw "Microsoft.Graph.Authentication module is not available. Aborting generation to avoid deleting existing documentation." } - Import-Module Microsoft.Graph.Authentication -Force -Global + Import-Module Microsoft.Graph.Authentication -Force -Global -ErrorAction Stop Get-ChildItem -Path $AuthDestination * -File -Recurse | foreach { $_.Delete() } $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { @@ -108,21 +108,37 @@ function Get-FolderByProfile { $Destination = Join-Path $WorkLoadDocsPath $GraphProfilePath $Path $DocsDestination = Join-Path $WorkLoadDocsPath $GraphProfilePath - # Guard against catastrophic deletions: if the module failed to install/import, - # skip it entirely so its committed docs are preserved instead of being deleted + # Guard against catastrophic deletions. A module can be installed yet fail to + # import (e.g. an Authentication version conflict), and ListAvailable alone does + # not catch that. Verify the module actually imports AND exposes commands; if it + # does not, skip it so its committed docs are preserved instead of being wiped # and never regenerated (which is what produced the mass-deletion refresh PRs). - if (-not (Get-Module -Name $Path -ListAvailable -ErrorAction SilentlyContinue)) { - Write-Warning "Module $Path is not available; skipping to preserve existing documentation." + $ModuleUsable = $false + if (Get-Module -Name $Path -ListAvailable -ErrorAction SilentlyContinue) { + try { + Import-Module $Path -Force -Global -ErrorAction Stop + if (Get-Command -Module $Path -ErrorAction SilentlyContinue) { + $ModuleUsable = $true + } + } catch { + Write-Warning "Module $Path failed to import: $($_.Exception.Message)" + } + } + if (-not $ModuleUsable) { + Write-Warning "Module $Path is not usable; skipping to preserve existing documentation." return } - Import-Module $Path -Force -Global -ErrorAction SilentlyContinue if (-not(Test-Path $Destination)) { New-Item -Path $Destination -ItemType Directory } - - Get-ChildItem -Path $Destination * -File -Recurse | foreach { $_.Delete() } + + # NOTE: docs are intentionally NOT bulk-deleted here. Each doc is overwritten in + # place as it is regenerated, and only genuine orphans (commands no longer in the + # metadata) are removed afterwards. This guarantees that a transient generation + # failure can never wipe a module's documentation. $CmdletCount = 0 + $MetadataCommands = @{} # Generate table of contents for each module $TocFileName = "$Path.md" $ModuleGuid = [guid]::NewGuid().ToString() @@ -147,19 +163,27 @@ function Get-FolderByProfile { Add-Content -Path $Destination\$TocFileName -Value "## $Path Cmdlets" $CommandMetadataContent | Where-Object { $_.Module -eq $ModName -and $_.ApiVersion -eq $GraphProfile } | ForEach-Object { $Command = $_.Command - $CmdletDocsPath = Join-Path $WorkLoadDocsPath $GraphProfilePath $Path "$Command.md" - if (-not(Test-Path $CmdletDocsPath)) { - if (Get-Command -Name $Command -ErrorAction SilentlyContinue) { - Set-Help -ModuleDocsPath $DocsDestination -Command $Command -Module $Path - } else { - Write-Warning "Cmdlet $Command is not available." - } - + $MetadataCommands[$Command] = $true + if (Get-Command -Name $Command -ErrorAction SilentlyContinue) { + Set-Help -ModuleDocsPath $DocsDestination -Command $Command -Module $Path + } else { + Write-Warning "Cmdlet $Command is not available." } Add-Content -Path $Destination\$TocFileName -Value "### [$Command]($Command.md)" Add-Content -Path $Destination\$TocFileName -Value "" $CmdletCount++ } + + # Remove only genuine orphans: docs whose command is no longer in the metadata. + # Docs for commands still in metadata are preserved even if this run failed to + # regenerate them, so a bad run cannot delete valid documentation. + Get-ChildItem -Path $Destination -Filter "*.md" -File | Where-Object { + $_.Name -ne $TocFileName -and -not $MetadataCommands.ContainsKey($_.BaseName) + } | ForEach-Object { + Write-Host "Removing orphaned doc: $($_.Name)" + Remove-Item $_.FullName -Force + } + if($CmdletCount -eq 0){ Remove-Item -LiteralPath $Destination -Force -Recurse } From 00db04466cdc97b8fcbf4298c23497504bb7fd81 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Thu, 30 Jul 2026 17:20:46 -0700 Subject: [PATCH 08/17] Refactor weekly docs pipeline into isolated per-module stages Each Graph workload module now generates in its own Azure DevOps stage per SDK profile (~86 independent stages), giving every module a fresh agent and a clean assembly-load context. This structurally eliminates the "assembly with same name is already loaded" collisions that produced mass-deletion / no-op refresh PRs. - GenerateMarkDown.ps1: add -GraphProfileFilter and -ModuleFilter scoping; in scoped runs do a complete delete + full regen of the single module, throw before any deletion on import failure (fail-safe), and emit a ModuleGenerated signal only on success. - 9 post-processing scripts: add matching profile/module scoping and empty-commit guards so each touches only the target module folder. - update-template.yml: parameterized install (InstallProfile/Module) that installs only Authentication + the single workload submodule for isolated runs; install failures warn instead of failing. - New common-templates/generate-module-docs-steps.yml: full single-module sequence (install -> generate -> post-process -> push -> PR). Generate step is continueOnError and every later step is gated on ModuleGenerated, so a failing module deletes nothing, opens no PR, and never fails the overall pipeline. - New common-templates/module-stages.yml: emits one dependsOn:[] stage per module. - powershell-docs.yml: invoke module-stages.yml for v1.0 (incl. Authentication) and beta; each stage opens its own pull request. ms.date changes every run (StabilizeMsDate is intentionally not run) for reviewable PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- .../generate-module-docs-steps.yml | 219 ++++++++++++++++ .../common-templates/module-stages.yml | 50 ++++ azure-pipelines/powershell-docs.yml | 248 ++++++++---------- azure-pipelines/update-template.yml | 60 ++++- scripts/CorrectRelatedLinks-AllFiles.ps1 | 10 +- scripts/EscapeDisallowedHtmlTags.ps1 | 16 +- scripts/GenerateAliasedDocs.ps1 | 11 +- scripts/GenerateMarkDown.ps1 | 93 +++++-- scripts/GeneratePermissionsTable.ps1 | 15 +- scripts/MsSubserviceUpdate.ps1 | 7 +- scripts/RemoveBoilerPlateCode.ps1 | 34 ++- scripts/RemoveInvalidFullStops.ps1 | 16 +- .../RepairExamplesDescriptionsAndTitle.ps1 | 14 +- scripts/UpdateLinks.ps1 | 9 +- 14 files changed, 600 insertions(+), 202 deletions(-) create mode 100644 azure-pipelines/common-templates/generate-module-docs-steps.yml create mode 100644 azure-pipelines/common-templates/module-stages.yml diff --git a/azure-pipelines/common-templates/generate-module-docs-steps.yml b/azure-pipelines/common-templates/generate-module-docs-steps.yml new file mode 100644 index 0000000000000..290ee79651d59 --- /dev/null +++ b/azure-pipelines/common-templates/generate-module-docs-steps.yml @@ -0,0 +1,219 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# +# Reusable steps that generate and post-process documentation for a SINGLE module in a SINGLE +# SDK profile, then open a dedicated pull request for it. Designed to run inside an isolated +# per-module stage so an import/assembly conflict for one module can never affect another. +# +# Failure containment: the generate step runs with continueOnError, and every step after it is +# gated on the ModuleGenerated variable (set only when generation actually succeeds). If the +# module fails to import, nothing is deleted, no PR is opened, and the stage is marked +# partially-succeeded WITHOUT failing the overall pipeline or any other module's stage. + +parameters: + - name: Module + type: string + - name: GraphProfileFilter + type: string + - name: BranchPrefix + type: string + default: WeeklyDocs + - name: BaseBranch + type: string + default: main + +steps: + - template: ../update-template.yml + parameters: + InstallProfile: ${{ parameters.GraphProfileFilter }} + Module: ${{ parameters.Module }} + + - task: PowerShell@2 + name: ComputeBranch + displayName: 'Compute branch name' + inputs: + targetType: 'inline' + pwsh: true + script: | + git submodule update --init --recursive + $branch = "{0}-{1}-{2}_{3}" -f "${{ parameters.BranchPrefix }}", "${{ parameters.GraphProfileFilter }}", "${{ parameters.Module }}", (Get-Date -Format yyyyMMddHHmm) + Write-Host "Compute branch: $branch" + Write-Host "##vso[task.setvariable variable=ModuleBranch;isOutput=true]$branch" + + - task: Bash@3 + displayName: 'Create module refresh branch' + inputs: + targetType: inline + script: | + git status + git branch $(ComputeBranch.ModuleBranch) + git checkout $(ComputeBranch.ModuleBranch) + git status + + - task: PowerShell@2 + displayName: 'Create missing external docs folder' + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/CreateExternalDocsFolder.ps1 + + - task: PowerShell@2 + name: GenerateDocs + displayName: 'Generate markdown (${{ parameters.Module }} / ${{ parameters.GraphProfileFilter }})' + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/GenerateMarkDown.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Escape disallowed html tags' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/EscapeDisallowedHtmlTags.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Update metadata header' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/MsSubserviceUpdate.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Generate permissions table' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/GeneratePermissionsTable.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Update Links' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/UpdateLinks.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Repair Examples and Descriptions and Title' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/RepairExamplesDescriptionsAndTitle.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Remove boiler plate code' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/RemoveBoilerPlateCode.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Remove invalid fullstops' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/RemoveInvalidFullStops.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Generate missing docs for aliased cmdlets' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/GenerateAliasedDocs.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: PowerShell@2 + displayName: 'Correct related links section' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + inputs: + targetType: 'filePath' + pwsh: true + filePath: scripts/CorrectRelatedLinks-AllFiles.ps1 + arguments: -GraphProfileFilter "${{ parameters.GraphProfileFilter }}" -ModuleFilter "${{ parameters.Module }}" + + - task: AzureKeyVault@2 + displayName: "Azure Key Vault: Get GitHub App secrets" + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + inputs: + azureSubscription: "Federated AKV Managed Identity Connection" + KeyVaultName: akv-prod-eastus + SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" + + - task: PowerShell@2 + displayName: 'Push ${{ parameters.Module }} (${{ parameters.GraphProfileFilter }}) branch' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + env: + GhAppId: $(microsoft-graph-devx-bot-appid) + GhAppKey: $(microsoft-graph-devx-bot-privatekey) + inputs: + targetType: inline + pwsh: true + script: | + git config --global user.email "GraphTooling@service.microsoft.com" + git config --global user.name "Microsoft Graph DevX Tooling" + git config --system core.longpaths true + # The microsoft-graph-devx-bot GitHub App must have contents:write on this repo. + $token = & "$(Build.SourcesDirectory)/scripts/Generate-Github-Token.ps1" -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository "MicrosoftDocs/microsoftgraph-docs-powershell" + if ([string]::IsNullOrWhiteSpace($token)) { throw "Failed to generate GitHub App installation token." } + # Mask the token so it is never surfaced in pipeline logs. + Write-Host "##vso[task.setsecret]$token" + git status + git add . + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Updating reference docs for ${{ parameters.Module }} (${{ parameters.GraphProfileFilter }})" + } + else { + $global:LASTEXITCODE = 0 + } + git push --set-upstream "https://x-access-token:$token@github.com/MicrosoftDocs/microsoftgraph-docs-powershell.git" $(ComputeBranch.ModuleBranch) + git status + + - task: PowerShell@2 + displayName: 'Create PR for ${{ parameters.Module }} (${{ parameters.GraphProfileFilter }})' + condition: and(succeeded(), eq(variables['ModuleGenerated'], 'true')) + continueOnError: true + env: + GhAppId: $(microsoft-graph-devx-bot-appid) + GhAppKey: $(microsoft-graph-devx-bot-privatekey) + inputs: + targetType: inline + pwsh: true + script: | + $BaseBranchName = "${{ parameters.BaseBranch }}" + $Head = "MicrosoftDocs:$(ComputeBranch.ModuleBranch)" + $Title = "Weekly Docs Refresh: ${{ parameters.Module }} (${{ parameters.GraphProfileFilter }})" + $Body = "This pull request was automatically created by Azure Pipelines for the ``${{ parameters.Module }}`` module (``${{ parameters.GraphProfileFilter }}`` profile). **Important** Check for unexpected deletions or changes in this PR." + # The microsoft-graph-devx-bot GitHub App must have pull_requests:write on this repo. + $env:GITHUB_TOKEN = & "$(Build.SourcesDirectory)/scripts/Generate-Github-Token.ps1" -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository "MicrosoftDocs/microsoftgraph-docs-powershell" + if ([string]::IsNullOrWhiteSpace($env:GITHUB_TOKEN)) { throw "Failed to generate GitHub App installation token." } + # Mask the token so it is never surfaced in pipeline logs. + Write-Host "##vso[task.setsecret]$env:GITHUB_TOKEN" + gh pr create -t $Title -b $Body -B $BaseBranchName -H $Head diff --git a/azure-pipelines/common-templates/module-stages.yml b/azure-pipelines/common-templates/module-stages.yml new file mode 100644 index 0000000000000..f8a1f19f2cfc1 --- /dev/null +++ b/azure-pipelines/common-templates/module-stages.yml @@ -0,0 +1,50 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# +# Emits one fully independent stage per module for a given SDK profile. Each stage runs on its +# own agent (clean assembly-load context), generates + post-processes docs for that single +# module, and opens its own pull request. All stages have dependsOn: [] so they run in +# parallel and one module can never block or fail another. + +parameters: + - name: GraphProfileFilter + type: string + # Short label used in stage names (stage names cannot contain '.'), e.g. "v1" or "beta". + - name: ProfileLabel + type: string + - name: Modules + type: object + default: [] + - name: BranchPrefix + type: string + default: WeeklyDocs + - name: BaseBranch + type: string + default: main + - name: PipelineTimeout + type: number + default: 120 + +stages: + - ${{ each module in parameters.Modules }}: + - stage: "Gen_${{ parameters.ProfileLabel }}_${{ replace(module, '.', '_') }}" + displayName: '${{ parameters.GraphProfileFilter }} - ${{ module }}' + dependsOn: [] + jobs: + - job: GenerateModuleDocs + timeoutInMinutes: ${{ parameters.PipelineTimeout }} + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish missing external docs' + targetPath: missingexternaldocsurl + artifactName: "MissingExternalDocs-${{ parameters.ProfileLabel }}-${{ replace(module, '.', '-') }}" + publishLocation: 'Container' + condition: succeededOrFailed() + steps: + - template: generate-module-docs-steps.yml + parameters: + Module: ${{ module }} + GraphProfileFilter: ${{ parameters.GraphProfileFilter }} + BranchPrefix: ${{ parameters.BranchPrefix }} + BaseBranch: ${{ parameters.BaseBranch }} diff --git a/azure-pipelines/powershell-docs.yml b/azure-pipelines/powershell-docs.yml index 603004858ab45..b6dc5b22f8b9b 100644 --- a/azure-pipelines/powershell-docs.yml +++ b/azure-pipelines/powershell-docs.yml @@ -47,148 +47,106 @@ extends: customBuildTags: - ES365AIMigrationTooling stages: - - stage: stage - jobs: - - job: PowerShellDocsUpdate - timeoutInMinutes: ${{ parameters.PipelineTimeout }} - templateContext: - outputs: - - output: pipelineArtifact - displayName: 'Publish Examples to be reviewed as artifact' - targetPath: missingexternaldocsurl - artifactName: 'MissingExternalDocs' - publishLocation: 'Container' - steps: - - template: azure-pipelines/update-template.yml@self - - task : PowerShell@2 - name: "ComputeBranch" - displayName: 'Compute Branch Name' - inputs: - targetType: 'inline' - script: | - git submodule update --init --recursive - $branch = "{0}_{1}" -f "WeeklyReferenceDocsUpdate", (Get-Date -Format yyyyMMddHHmm) - Write-Host "Compute branch: $branch" - Write-Host "##vso[task.setvariable variable=WeeklyReferenceDocsBranch;isOutput=true]$branch" - - task: Bash@3 - displayName: "Create weekly refresh branch" - inputs: - targetType: inline - script: | - git status - git branch $(ComputeBranch.WeeklyReferenceDocsBranch) - git checkout $(ComputeBranch.WeeklyReferenceDocsBranch) - git status - - task: PowerShell@2 - displayName: 'Create missing external docs folder' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/CreateExternalDocsFolder.ps1 - - - task: PowerShell@2 - displayName: 'Generate markdown files from PowerShell help files' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/GenerateMarkDown.ps1 - - task: PowerShell@2 - displayName: 'Escape disallowed html tags' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/EscapeDisallowedHtmlTags.ps1 - - task: PowerShell@2 - displayName: 'Update metadata header' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/MsSubserviceUpdate.ps1 - - task: PowerShell@2 - displayName: 'Generate permissions table' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/GeneratePermissionsTable.ps1 - - task: PowerShell@2 - displayName: 'Update Links' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/UpdateLinks.ps1 - errorActionPreference: 'stop' - - task: PowerShell@2 - displayName: 'Repair Examples and Descriptions and Title' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/RepairExamplesDescriptionsAndTitle.ps1 - - task: PowerShell@2 - displayName: 'Remove boiler plate code' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/RemoveBoilerPlateCode.ps1 - - task: PowerShell@2 - displayName: 'Remove invalid fullstops' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/RemoveInvalidFullStops.ps1 - - task: PowerShell@2 - displayName: 'Generate missing docs for aliased cmdlets' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/GenerateAliasedDocs.ps1 - - task: PowerShell@2 - displayName: 'Correct related links section' - continueOnError: false - inputs: - targetType: 'filePath' - pwsh: true - filePath: scripts/CorrectRelatedLinks-AllFiles.ps1 - - task: AzureKeyVault@2 - displayName: "Azure Key Vault: Get GitHub App secrets" - inputs: - azureSubscription: "Federated AKV Managed Identity Connection" - KeyVaultName: akv-prod-eastus - SecretsFilter: "microsoft-graph-devx-bot-appid,microsoft-graph-devx-bot-privatekey" - - task: PowerShell@2 - displayName: Pushing to github - env: - GhAppId: $(microsoft-graph-devx-bot-appid) - GhAppKey: $(microsoft-graph-devx-bot-privatekey) - inputs: - targetType: inline - pwsh: true - script: | - git config --global user.email "GraphTooling@service.microsoft.com" - git config --global user.name "Microsoft Graph DevX Tooling" - git config --system core.longpaths true - # The microsoft-graph-devx-bot GitHub App must have contents:write on this repo. - $token = & "$(Build.SourcesDirectory)/scripts/Generate-Github-Token.ps1" -AppClientId $env:GhAppId -AppPrivateKeyContents $env:GhAppKey -Repository "MicrosoftDocs/microsoftgraph-docs-powershell" - if ([string]::IsNullOrWhiteSpace($token)) { throw "Failed to generate GitHub App installation token." } - # Mask the token so it is never surfaced in pipeline logs. - Write-Host "##vso[task.setsecret]$token" - git status - git add . - git commit -m "Updating reference docs" - git push --set-upstream "https://x-access-token:$token@github.com/MicrosoftDocs/microsoftgraph-docs-powershell.git" $(ComputeBranch.WeeklyReferenceDocsBranch) - git status - - template: azure-pipelines/common-templates/create-pr.yml@self - parameters: - BaseBranch: "main" - TargetBranch: $(ComputeBranch.WeeklyReferenceDocsBranch) - Title: "Weekly PowerShell Microsoft Graph Reference Docs Refresh" - Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR." \ No newline at end of file + - template: azure-pipelines/common-templates/module-stages.yml@self + parameters: + GraphProfileFilter: "v1.0" + ProfileLabel: "v1" + BranchPrefix: "WeeklyDocs" + BaseBranch: "main" + PipelineTimeout: ${{ parameters.PipelineTimeout }} + Modules: + - Authentication + - Applications + - Bookings + - BusinessScenario + - BackupRestore + - Calendar + - ChangeNotifications + - CloudCommunications + - Compliance + - CrossDeviceExperiences + - Devices.CloudPrint + - Devices.CorporateManagement + - Devices.ServiceAnnouncement + - DeviceManagement + - DeviceManagement.Administration + - DeviceManagement.Enrollment + - DeviceManagement.Actions + - DeviceManagement.Functions + - DirectoryObjects + - Education + - Files + - Financials + - Groups + - Identity.DirectoryManagement + - Identity.Governance + - Identity.SignIns + - Identity.Partner + - Mail + - ManagedTenants + - NetworkAccess + - Notes + - People + - PersonalContacts + - Planner + - Reports + - SchemaExtensions + - Search + - Security + - Sites + - Teams + - Users + - Users.Actions + - Users.Functions + - WindowsUpdates + - template: azure-pipelines/common-templates/module-stages.yml@self + parameters: + GraphProfileFilter: "beta" + ProfileLabel: "beta" + BranchPrefix: "WeeklyDocs" + BaseBranch: "main" + PipelineTimeout: ${{ parameters.PipelineTimeout }} + Modules: + - Applications + - Bookings + - BusinessScenario + - BackupRestore + - Calendar + - ChangeNotifications + - CloudCommunications + - Compliance + - CrossDeviceExperiences + - Devices.CloudPrint + - Devices.CorporateManagement + - Devices.ServiceAnnouncement + - DeviceManagement + - DeviceManagement.Administration + - DeviceManagement.Enrollment + - DeviceManagement.Actions + - DeviceManagement.Functions + - DirectoryObjects + - Education + - Files + - Financials + - Groups + - Identity.DirectoryManagement + - Identity.Governance + - Identity.SignIns + - Identity.Partner + - Mail + - ManagedTenants + - NetworkAccess + - Notes + - People + - PersonalContacts + - Planner + - Reports + - SchemaExtensions + - Search + - Security + - Sites + - Teams + - Users + - Users.Actions + - Users.Functions + - WindowsUpdates diff --git a/azure-pipelines/update-template.yml b/azure-pipelines/update-template.yml index cd0ec7be60216..8884e887a9aae 100644 --- a/azure-pipelines/update-template.yml +++ b/azure-pipelines/update-template.yml @@ -1,3 +1,16 @@ +parameters: + # Which SDK profile to install for. "both" preserves the original full-run behaviour and + # installs the Microsoft.Graph and Microsoft.Graph.Beta meta modules. + - name: InstallProfile + type: string + default: both + # When set, only the single workload submodule for that module (plus Authentication) is + # installed instead of the whole SDK. This keeps each isolated per-module stage fast and + # guarantees only one workload module is ever present in the session. + - name: Module + type: string + default: "" + steps: - task: PowerShell@2 displayName: Install Required Modules @@ -12,25 +25,44 @@ steps: if (-not (Get-PSRepository -Name PowerShell_V2_Build -ErrorAction SilentlyContinue)) { Register-PSRepository -Name PowerShell_V2_Build -SourceLocation $feedUrl -InstallationPolicy Trusted -Credential $cred } - try{ - # Try to update the V1 module first. - Install-Module Microsoft.Graph.Beta -Repository PowerShell_V2_Build -Credential $cred -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber - }catch{ - # If the module is not installed, install it. - echo "Error when installing Beta" + + $installProfile = "${{ parameters.InstallProfile }}" + $module = "${{ parameters.Module }}" + + # Build the list of modules to install. + $toInstall = @() + if ([string]::IsNullOrWhiteSpace($module)) { + # Full-run behaviour: install the meta module(s) for the requested profile(s). + if ($installProfile -ne 'v1.0') { $toInstall += 'Microsoft.Graph.Beta' } + if ($installProfile -ne 'beta') { $toInstall += 'Microsoft.Graph' } } - try{ - # Try to update the beta module first. - Install-Module Microsoft.Graph -Repository PowerShell_V2_Build -Credential $cred -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber - }catch{ - # If the module is not installed, install it. - echo "Error when installing V1" + else { + # Isolated per-module run: install only Authentication + the single workload + # submodule for the target profile. + $toInstall += 'Microsoft.Graph.Authentication' + if ($installProfile -eq 'beta') { + $toInstall += "Microsoft.Graph.Beta.$module" + } + else { + $toInstall += "Microsoft.Graph.$module" + } + } + + foreach ($m in $toInstall) { + try { + Install-Module $m -Repository PowerShell_V2_Build -Credential $cred -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber + } + catch { + # Do not fail the install step; a missing/failed module surfaces later as a + # fail-safe (no deletion, no PR) in the isolated generation stage. + Write-Host "##vso[task.logissue type=warning]Failed to install $m : $($_.Exception.Message)" + } } - $modules = Get-Module -Name Microsoft.Graph -ListAvailable + $modules = Get-Module -Name Microsoft.Graph* -ListAvailable foreach($r in $modules) { - echo $r.Version + echo "$($r.Name) $($r.Version)" } env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) diff --git a/scripts/CorrectRelatedLinks-AllFiles.ps1 b/scripts/CorrectRelatedLinks-AllFiles.ps1 index 3f6a71383b9e6..be414538528a7 100644 --- a/scripts/CorrectRelatedLinks-AllFiles.ps1 +++ b/scripts/CorrectRelatedLinks-AllFiles.ps1 @@ -19,7 +19,11 @@ param( [Parameter(Mandatory = $false)] [ValidateSet("v1.0", "beta", "both")] - [string]$GraphProfile = "both" + [Alias("GraphProfileFilter")] + [string]$GraphProfile = "both", + + [Parameter(Mandatory = $false)] + [string]$ModuleFilter = "" ) function Get-GraphMapping { @@ -217,6 +221,10 @@ if ($ModulesToGenerate.Count -eq 0) { } } +if (-not [string]::IsNullOrWhiteSpace($ModuleFilter)) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) +} + # Main execution Write-Host "=== Related Links Correction Script ===" -ForegroundColor Blue Write-Host "Working directory: $WorkLoadDocsPath" -ForegroundColor Blue diff --git a/scripts/EscapeDisallowedHtmlTags.ps1 b/scripts/EscapeDisallowedHtmlTags.ps1 index 597d7a5633f81..0039a05b33500 100644 --- a/scripts/EscapeDisallowedHtmlTags.ps1 +++ b/scripts/EscapeDisallowedHtmlTags.ps1 @@ -2,7 +2,10 @@ # Licensed under the MIT License. Param( $ModulesToGenerate = @(), - [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc") + [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Get-GraphMapping { $graphMapping = @{} @@ -20,13 +23,19 @@ function EscapeDisallowedHtmlTags { $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { $graphProfile = $_ + if ($GraphProfileFilter -ne "both" -and $graphProfile -ne $GraphProfileFilter) { return } Get-FilesByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate } git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Escaped disallowed html tags" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Escaped disallowed html tags" + } else { + $global:LASTEXITCODE = 0 + } } function Get-FilesByProfile { Param( @@ -322,5 +331,8 @@ function CleanupFile { } Write-Host -ForegroundColor Green "-------------finished checking out to today's branch-------------" +if (-not [string]::IsNullOrWhiteSpace($ModuleFilter)) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) +} EscapeDisallowedHtmlTags -ModulesToGenerate $ModulesToGenerate Write-Host -ForegroundColor Green "-------------Done-------------" \ No newline at end of file diff --git a/scripts/GenerateAliasedDocs.ps1 b/scripts/GenerateAliasedDocs.ps1 index 97eba9685354d..c7ba9bec1d19c 100644 --- a/scripts/GenerateAliasedDocs.ps1 +++ b/scripts/GenerateAliasedDocs.ps1 @@ -6,12 +6,18 @@ See related PR for more information. #> +Param( + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" +) + function Start-GenerateAliasedDocs { $BreakingChangeReportV1Report = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/docs/PowerShellBreakingChanges-V1.0.csv") $BreakingChangeReportBetaReport = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/docs/PowerShellBreakingChanges-beta.csv") $Reports = @() - $Reports += $BreakingChangeReportV1Report - $Reports += $BreakingChangeReportBetaReport + if ($GraphProfileFilter -ne "beta") { $Reports += $BreakingChangeReportV1Report } + if ($GraphProfileFilter -ne "v1.0") { $Reports += $BreakingChangeReportBetaReport } foreach ($BreakingChangeReport in $Reports) { Import-Csv $BreakingChangeReport | ForEach-Object { $Command = $_."NewCmdlet" @@ -39,6 +45,7 @@ function Copy-Files { if($CmdDetails){ $Module = $CmdDetails.Module $Module = $Module.Replace("Beta.", "") + if (-not [string]::IsNullOrWhiteSpace($ModuleFilter) -and $Module -ne $ModuleFilter) { return } $Module = "$ModulePrefix.$Module" $NewDoc = (Join-Path $PSScriptRoot "../microsoftgraph" $GraphProfilePath $Module "$Command.md") if(Test-Path $NewDoc) { diff --git a/scripts/GenerateMarkDown.ps1 b/scripts/GenerateMarkDown.ps1 index 0d5a062bef429..ed6c85dcdb009 100644 --- a/scripts/GenerateMarkDown.ps1 +++ b/scripts/GenerateMarkDown.ps1 @@ -5,7 +5,16 @@ Param( $ModulesToGenerate = @(), [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config\ModulesMapping.jsonc"), [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"), - [string] $CmdletMetadataPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src/Authentication/Authentication/custom/common/MgCommandMetadata.json") + [string] $CmdletMetadataPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src/Authentication/Authentication/custom/common/MgCommandMetadata.json"), + # Restrict generation to a single SDK profile ("v1.0" or "beta"); "both" keeps the + # original full-run behaviour. + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + # Restrict generation to a single module (e.g. "Applications" or "Authentication"). Empty + # means all modules. When set, the run is "scoped": the module's folder is completely + # cleared and regenerated, and an import failure aborts THIS run (fail-safe, no deletion) + # instead of silently skipping. + [string] $ModuleFilter = "" ) function Get-GraphMapping { $graphMapping = @{} @@ -51,36 +60,55 @@ function Start-GraphHelp { Param( $ModulesToGenerate = @() ) - - #Generate for auth module first + $ModulePrefix = "Microsoft.Graph" $AuthPath = "$ModulePrefix.Authentication" $AuthDestination = Join-Path $WorkLoadDocsPath "graph-powershell-1.0" $AuthPath - # Guard against catastrophic deletions: never remove existing docs unless the module - # is available to regenerate them. Authentication is required for every run, so abort - # if it failed to install rather than wiping committed documentation. - if (-not (Get-Module -Name Microsoft.Graph.Authentication -ListAvailable -ErrorAction SilentlyContinue)) { - throw "Microsoft.Graph.Authentication module is not available. Aborting generation to avoid deleting existing documentation." + # Determine which profiles this run covers. + $GraphMapping = Get-GraphMapping + $profilesToProcess = @($GraphMapping.Keys) + if ($GraphProfileFilter -ne "both") { + $profilesToProcess = @($GraphProfileFilter) } - Import-Module Microsoft.Graph.Authentication -Force -Global -ErrorAction Stop - Get-ChildItem -Path $AuthDestination * -File -Recurse | foreach { $_.Delete() } - $GraphMapping = Get-GraphMapping - $GraphMapping.Keys | ForEach-Object { - $graphProfile = $_ - $profilePath = "graph-powershell-1.0" - if ($graphProfile -eq "beta") { - $profilePath = "graph-powershell-beta" - } + # Authentication docs live under graph-powershell-1.0 and are only generated on a full run + # or when Authentication is the explicitly targeted module. + $generateAuth = ([string]::IsNullOrWhiteSpace($ModuleFilter) -or $ModuleFilter -eq "Authentication") + if ($generateAuth -and ($profilesToProcess -contains "v1.0")) { + # Guard against catastrophic deletions: never remove existing docs unless the module + # is available to regenerate them. Authentication is required for every run, so abort + # if it failed to install rather than wiping committed documentation. + if (-not (Get-Module -Name Microsoft.Graph.Authentication -ListAvailable -ErrorAction SilentlyContinue)) { + throw "Microsoft.Graph.Authentication module is not available. Aborting generation to avoid deleting existing documentation." + } + Import-Module Microsoft.Graph.Authentication -Force -Global -ErrorAction Stop + Get-ChildItem -Path $AuthDestination * -File -Recurse | foreach { $_.Delete() } $AuthenticationDocsPath = Join-Path $PSScriptRoot "..\microsoftgraph\graph-powershell-1.0" - Set-Help -ModuleDocsPath $AuthenticationDocsPath -Command "Connect-MgGraph" -Module "Microsoft.Graph.Authentication" - Get-FolderByProfile -GraphProfile $graphProfile -GraphProfilePath $profilePath -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate + Set-Help -ModuleDocsPath $AuthenticationDocsPath -Command "Connect-MgGraph" -Module "Microsoft.Graph.Authentication" + } + + # Workload modules. Skip entirely when Authentication is the explicit single target. + if ($ModuleFilter -ne "Authentication") { + $profilesToProcess | ForEach-Object { + $graphProfile = $_ + $profilePath = "graph-powershell-1.0" + if ($graphProfile -eq "beta") { + $profilePath = "graph-powershell-beta" + } + Get-FolderByProfile -GraphProfile $graphProfile -GraphProfilePath $profilePath -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate + } } + git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Updated markdown help" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Updated markdown help" + } else { + $global:LASTEXITCODE = 0 + } } function Get-FolderByProfile { @@ -95,6 +123,14 @@ function Get-FolderByProfile { $ModulesToGenerate = @() ) $CommandMetadataContent = Get-Content $CmdletMetadataPath | ConvertFrom-Json + + # In scoped (single-module) runs, restrict to the requested module and enable + # complete-delete + regenerate for it (safe because the module is verified to import + # below before anything is removed). + $Scoped = -not [string]::IsNullOrWhiteSpace($ModuleFilter) + if ($Scoped) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) + } $ModulesToGenerate | ForEach-Object { $ModuleName = $_ @@ -125,6 +161,12 @@ function Get-FolderByProfile { } } if (-not $ModuleUsable) { + if ($Scoped) { + # Isolated single-module run: fail fast WITHOUT deleting anything so the + # module's committed docs are preserved. The pipeline job contains this + # failure (continueOnError) so it never fails the whole run or other modules. + throw "Module $Path is not usable in isolated generation; aborting this module without deleting its documentation." + } Write-Warning "Module $Path is not usable; skipping to preserve existing documentation." return } @@ -132,6 +174,13 @@ function Get-FolderByProfile { if (-not(Test-Path $Destination)) { New-Item -Path $Destination -ItemType Directory } + elseif ($Scoped) { + # Complete deletion + regeneration for this single module. Safe here because the + # module imported successfully above, so regeneration repopulates the folder. + Get-ChildItem -Path $Destination -Filter "*.md" -File | ForEach-Object { + Remove-Item $_.FullName -Force + } + } # NOTE: docs are intentionally NOT bulk-deleted here. Each doc is overwritten in # place as it is regenerated, and only genuine orphans (commands no longer in the @@ -209,4 +258,8 @@ if ($ModulesToGenerate.Count -eq 0) { } Write-Host -ForegroundColor Green "-------------finished checking out to today's branch-------------" Start-GraphHelp -ModulesToGenerate $ModulesToGenerate +# Signal successful generation so downstream pipeline steps (post-processing, push, PR) only +# run when this module actually generated. On an import failure the script throws before this +# line, the variable is never set, and the isolated stage opens no PR and deletes nothing. +Write-Host "##vso[task.setvariable variable=ModuleGenerated]true" Write-Host -ForegroundColor Green "-------------Done-------------" \ No newline at end of file diff --git a/scripts/GeneratePermissionsTable.ps1 b/scripts/GeneratePermissionsTable.ps1 index 47e90ae3698f8..d854d62458c62 100644 --- a/scripts/GeneratePermissionsTable.ps1 +++ b/scripts/GeneratePermissionsTable.ps1 @@ -1,6 +1,9 @@ param( [string]$MgCommandMetadatJsonFile = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src/Authentication/Authentication/custom/common/MgCommandMetadata.json"), - [string[]]$CmdList = @() + [string[]]$CmdList = @(), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Start-Generator { @@ -11,6 +14,9 @@ function Start-Generator { $CommandName = $_.Command; $ApiVersion = $_.ApiVersion $Module = $_.Module; + if ($GraphProfileFilter -ne "both" -and $ApiVersion -ne $GraphProfileFilter) { return } + $normalizedModule = $Module -replace "^Beta\.", "" + if (-not [string]::IsNullOrWhiteSpace($ModuleFilter) -and $normalizedModule -ne $ModuleFilter) { return } #Array for DelegatedWork Permissions $DelegatedWorkPermissions = @(); #Array for Application Permissions @@ -70,7 +76,12 @@ function Start-Generator { git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Inserted permissions Table" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Inserted permissions Table" + } else { + $global:LASTEXITCODE = 0 + } } catch { Write-Host "Error in $_"; diff --git a/scripts/MsSubserviceUpdate.ps1 b/scripts/MsSubserviceUpdate.ps1 index d9bbd826afe67..54ce3c003d8ca 100644 --- a/scripts/MsSubserviceUpdate.ps1 +++ b/scripts/MsSubserviceUpdate.ps1 @@ -5,7 +5,10 @@ Param( [string] $SDKDocsPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src"), [string] $SDKOpenApiPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell"), [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"), - [string] $MissingMsSubserviceHeaderPath = (Join-Path $PSScriptRoot "../missingexternaldocsurl") + [string] $MissingMsSubserviceHeaderPath = (Join-Path $PSScriptRoot "../missingexternaldocsurl"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Start-Generator { if (Test-Path $CommandMetadataPath) { @@ -22,6 +25,8 @@ function Start-Generator { $ModulePrefix = "Microsoft.Graph.Beta" $ModuleName = $ModuleName.Replace("Beta.", "") } + if ($GraphProfileFilter -ne "both" -and $GraphProfile -ne $GraphProfileFilter) { return } + if (-not [string]::IsNullOrWhiteSpace($ModuleFilter) -and $ModuleName -ne $ModuleFilter) { return } $Path = "$ModulePrefix.$ModuleName" $DestinationFile = Join-Path $WorkLoadDocsPath $GraphProfilePath $Path "$Command.md" try { diff --git a/scripts/RemoveBoilerPlateCode.ps1 b/scripts/RemoveBoilerPlateCode.ps1 index 246e79ba3febe..8158654b106a1 100644 --- a/scripts/RemoveBoilerPlateCode.ps1 +++ b/scripts/RemoveBoilerPlateCode.ps1 @@ -4,7 +4,10 @@ Param( $ModulesToGenerate = @(), [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"), [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"), - [string] $AuthLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication") + [string] $AuthLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Get-GraphMapping { $graphMapping = @{} @@ -19,19 +22,22 @@ function Start-Repair { $ModulesToGenerate = @() ) - #Cleanup Authentication Module first - $files = Get-ChildItem -Path $AuthLoadDocsPath -Filter *.md -Recurse - foreach ($file in $files) { - $content = Get-Content -Path $file.FullName - # Remove lines that contain '{{ Fill in the Description }}' or '### This' or '### *' or '### have' or '### certain' or '### the' - $cleanedContent = $content | Where-Object { $_ -notmatch '^\s*{{ Fill in the Description }}|^\s*### This|^\s*### \*|^\s*### have|^\s*### certain|^\s*### the' } - # Write the cleaned content back to the file - $cleanedContent | Set-Content -Path $file.FullName + #Cleanup Authentication Module first (only on a full run or the Authentication stage). + if ([string]::IsNullOrWhiteSpace($ModuleFilter) -or $ModuleFilter -eq "Authentication") { + $files = Get-ChildItem -Path $AuthLoadDocsPath -Filter *.md -Recurse + foreach ($file in $files) { + $content = Get-Content -Path $file.FullName + # Remove lines that contain '{{ Fill in the Description }}' or '### This' or '### *' or '### have' or '### certain' or '### the' + $cleanedContent = $content | Where-Object { $_ -notmatch '^\s*{{ Fill in the Description }}|^\s*### This|^\s*### \*|^\s*### have|^\s*### certain|^\s*### the' } + # Write the cleaned content back to the file + $cleanedContent | Set-Content -Path $file.FullName + } } $ModulePrefix = "Microsoft.Graph" $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { $graphProfile = $_ + if ($GraphProfileFilter -ne "both" -and $graphProfile -ne $GraphProfileFilter) { return } $profilePath = "graph-powershell-1.0" if ($graphProfile -eq "beta") { $profilePath = "graph-powershell-beta" @@ -41,7 +47,12 @@ function Start-Repair { git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Remove boiler plate code injected by Autorest" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Remove boiler plate code injected by Autorest" + } else { + $global:LASTEXITCODE = 0 + } } function Get-FilesByProfile { Param( @@ -118,5 +129,8 @@ if ($ModulesToGenerate.Count -eq 0) { } Write-Host -ForegroundColor Green "-------------finished checking out to today's branch-------------" +if (-not [string]::IsNullOrWhiteSpace($ModuleFilter)) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) +} Start-Repair -ModulesToGenerate $ModulesToGenerate Write-Host -ForegroundColor Green "-------------Done-------------" \ No newline at end of file diff --git a/scripts/RemoveInvalidFullStops.ps1 b/scripts/RemoveInvalidFullStops.ps1 index db34789d58025..21cfad73afe51 100644 --- a/scripts/RemoveInvalidFullStops.ps1 +++ b/scripts/RemoveInvalidFullStops.ps1 @@ -2,7 +2,10 @@ # Licensed under the MIT License. Param( $ModulesToGenerate = @(), - [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc") + [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Get-GraphMapping { $graphMapping = @{} @@ -20,13 +23,19 @@ function Remove-InvalidFullStops { $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { $graphProfile = $_ + if ($GraphProfileFilter -ne "both" -and $graphProfile -ne $GraphProfileFilter) { return } Get-FilesByProfile -GraphProfile $graphProfile -GraphProfilePath $GraphMapping[$graphProfile] -ModulePrefix $ModulePrefix -ModulesToGenerate $ModulesToGenerate } git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Removed invalid full stops from the beginning of lines" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Removed invalid full stops from the beginning of lines" + } else { + $global:LASTEXITCODE = 0 + } } function Get-FilesByProfile { Param( @@ -88,6 +97,9 @@ if ($ModulesToGenerate.Count -eq 0) { [HashTable] $ModuleMapping = Get-Content $ModuleMappingConfigPath | ConvertFrom-Json -AsHashTable $ModulesToGenerate = $ModuleMapping.Keys } +if (-not [string]::IsNullOrWhiteSpace($ModuleFilter)) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) +} Remove-InvalidFullStops -ModulesToGenerate $ModulesToGenerate diff --git a/scripts/RepairExamplesDescriptionsAndTitle.ps1 b/scripts/RepairExamplesDescriptionsAndTitle.ps1 index c8e3c74074799..e1fd1d5a8f172 100644 --- a/scripts/RepairExamplesDescriptionsAndTitle.ps1 +++ b/scripts/RepairExamplesDescriptionsAndTitle.ps1 @@ -4,7 +4,10 @@ Param( $ModulesToGenerate = @(), [string] $SDKDocsPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src"), [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"), - [string] $CommandMetadataPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src/Authentication/Authentication/custom/common/MgCommandMetadata.json") + [string] $CommandMetadataPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src/Authentication/Authentication/custom/common/MgCommandMetadata.json"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Start-Copy { @@ -22,6 +25,8 @@ function Start-Copy { $ModulePrefix = "Microsoft.Graph.Beta" $ModuleName = $ModuleName.Replace("Beta.", "") } + if ($GraphProfileFilter -ne "both" -and $GraphProfile -ne $GraphProfileFilter) { return } + if (-not [string]::IsNullOrWhiteSpace($ModuleFilter) -and $ModuleName -ne $ModuleFilter) { return } $DocPath = Join-Path $SDKDocsPath $ModuleName $GraphProfile "examples" "$Command.md" try { @@ -38,7 +43,12 @@ function Start-Copy { git config --global user.email "GraphTooling@service.microsoft.com" git config --global user.name "Microsoft Graph DevX Tooling" git add . - git commit -m "Repaired examples and descriptions" + $pending = git status --porcelain + if (-not [string]::IsNullOrWhiteSpace($pending)) { + git commit -m "Repaired examples and descriptions" + } else { + $global:LASTEXITCODE = 0 + } } diff --git a/scripts/UpdateLinks.ps1 b/scripts/UpdateLinks.ps1 index fcc8d8e2253b2..1ba011281aa6a 100644 --- a/scripts/UpdateLinks.ps1 +++ b/scripts/UpdateLinks.ps1 @@ -4,7 +4,10 @@ Param( $ModulesToGenerate = @(), [string] $ModuleMappingConfigPath = (Join-Path $PSScriptRoot "../microsoftgraph/config/ModulesMapping.jsonc"), [string] $SDKDocsPath = (Join-Path $PSScriptRoot "../msgraph-sdk-powershell/src"), - [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph") + [string] $WorkLoadDocsPath = (Join-Path $PSScriptRoot "../microsoftgraph"), + [ValidateSet("both", "v1.0", "beta")] + [string] $GraphProfileFilter = "both", + [string] $ModuleFilter = "" ) function Get-GraphMapping { $graphMapping = @{} @@ -22,6 +25,7 @@ function Start-Update { $GraphMapping = Get-GraphMapping $GraphMapping.Keys | ForEach-Object { $GraphProfile = $_ + if ($GraphProfileFilter -ne "both" -and $GraphProfile -ne $GraphProfileFilter) { return } $profilePath = "graph-powershell-1.0" if ($GraphProfile -eq "beta") { $ProfilePath = "graph-powershell-beta" @@ -205,5 +209,8 @@ if ($ModulesToGenerate.Count -eq 0) { Write-Host -ForegroundColor Green "-------------finished checking out to today's branch-------------" +if (-not [string]::IsNullOrWhiteSpace($ModuleFilter)) { + $ModulesToGenerate = @($ModulesToGenerate | Where-Object { $_ -eq $ModuleFilter }) +} Start-Update -ModulesToGenerate $ModulesToGenerate Write-Host -ForegroundColor Green "-------------Done-------------" \ No newline at end of file From 5202fe4d4c7f28cceeacc3451143fda9366e18b0 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 11:11:08 -0700 Subject: [PATCH 09/17] Fix template path resolution in powershell-docs.yml Azure DevOps resolves template references relative to the directory of the referencing file. powershell-docs.yml lives in azure-pipelines/, so the "azure-pipelines/common-templates/module-stages.yml@self" path resolved to azure-pipelines/azure-pipelines/common-templates/module-stages.yml and failed with "Not Found". Use a path relative to the file's own directory instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4d27d82f-3809-40d2-b4e7-6623436ff2ef --- azure-pipelines/powershell-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/powershell-docs.yml b/azure-pipelines/powershell-docs.yml index b6dc5b22f8b9b..71679bf595944 100644 --- a/azure-pipelines/powershell-docs.yml +++ b/azure-pipelines/powershell-docs.yml @@ -47,7 +47,7 @@ extends: customBuildTags: - ES365AIMigrationTooling stages: - - template: azure-pipelines/common-templates/module-stages.yml@self + - template: common-templates/module-stages.yml@self parameters: GraphProfileFilter: "v1.0" ProfileLabel: "v1" @@ -99,7 +99,7 @@ extends: - Users.Actions - Users.Functions - WindowsUpdates - - template: azure-pipelines/common-templates/module-stages.yml@self + - template: common-templates/module-stages.yml@self parameters: GraphProfileFilter: "beta" ProfileLabel: "beta" From 26a21c5d460b2c6f871d4aef2bf2b78ebb29a94c Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:14:08 +0000 Subject: [PATCH 10/17] Updated markdown help --- .../Confirm-MgDirectoryObjectMemberGroup.md | 63 +++------------ .../Confirm-MgDirectoryObjectMemberObject.md | 58 ++++---------- .../Get-MgDirectoryObject.md | 54 ++----------- ...rectoryObjectAvailableExtensionProperty.md | 51 ++---------- .../Get-MgDirectoryObjectById.md | 56 ++----------- .../Get-MgDirectoryObjectCount.md | 42 +++------- .../Get-MgDirectoryObjectDelta.md | 77 +++--------------- .../Get-MgDirectoryObjectMemberGroup.md | 59 +++----------- .../Get-MgDirectoryObjectMemberObject.md | 63 +++------------ .../Microsoft.Graph.DirectoryObjects.md | 21 +---- .../New-MgDirectoryObject.md | 44 +++-------- .../Remove-MgDirectoryObject.md | 42 ++-------- .../Test-MgDirectoryObjectProperty.md | 79 ++++--------------- .../Update-MgDirectoryObject.md | 50 ++++-------- 14 files changed, 147 insertions(+), 612 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index 9cfc6e7710de9..c9dfdca143253 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Confirm-MgDirectoryObjectMemberGroup --- @@ -14,14 +14,11 @@ title: Confirm-MgDirectoryObjectMemberGroup ## SYNOPSIS Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. -The specified object can be of one of the following types:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. +The specified object can be of one of the following types:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. -> [!NOTE] -> To view the beta release of this cmdlet, view [Confirm-MgBetaDirectoryObjectMemberGroup](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Confirm-MgBetaDirectoryObjectMemberGroup?view=graph-powershell-beta) - ## SYNTAX ### CheckExpanded (Default) @@ -31,7 +28,6 @@ Confirm-MgDirectoryObjectMemberGroup -DirectoryObjectId [-ResponseHeade [-AdditionalProperties ] [-GroupIds ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Check @@ -42,7 +38,6 @@ Confirm-MgDirectoryObjectMemberGroup -DirectoryObjectId [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### CheckViaIdentityExpanded @@ -52,7 +47,7 @@ Confirm-MgDirectoryObjectMemberGroup -InputObject [-ResponseHeadersVariable ] [-AdditionalProperties ] [-GroupIds ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### CheckViaIdentity @@ -63,7 +58,6 @@ Confirm-MgDirectoryObjectMemberGroup -InputObject [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -74,23 +68,14 @@ This cmdlet has the following aliases, ## DESCRIPTION Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. -The specified object can be of one of the following types:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. +The specified object can be of one of the following types:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Application.Read.All, User.ReadWrite.All, Device.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, Directory.Read.All, Application.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, AgentIdUser.ReadWrite.All, User.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Application.Read.All, AgentIdUser.ReadWrite.IdentityParentedBy, User.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, User.ReadWrite.All, Device.ReadWrite.All, Device.Read.All, Application.ReadWrite.All, Directory.Read.All, AgentIdUser.ReadWrite.All, | - ## EXAMPLES -### Example 1: Check group memberships for a directory object -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -106,10 +91,6 @@ $params = @{ Confirm-MgDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params -``` -This example will check group memberships for a directory object - - ## PARAMETERS ### -AdditionalProperties @@ -141,7 +122,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -239,7 +220,7 @@ HelpMessage: '' ### -GroupIds - +. ```yaml Type: System.String[] @@ -496,11 +477,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [GroupIds ]: -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -508,27 +489,5 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Confirm-MgDirectoryObjectMemberGroup](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup) +- [](https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index a3b7ce674e031..4de2e6ecc4815 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Confirm-MgDirectoryObjectMemberObject --- @@ -15,9 +15,6 @@ title: Confirm-MgDirectoryObjectMemberObject Invoke action checkMemberObjects -> [!NOTE] -> To view the beta release of this cmdlet, view [Confirm-MgBetaDirectoryObjectMemberObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Confirm-MgBetaDirectoryObjectMemberObject?view=graph-powershell-beta) - ## SYNTAX ### CheckExpanded (Default) @@ -27,7 +24,7 @@ Confirm-MgDirectoryObjectMemberObject -DirectoryObjectId [-ResponseHeadersVariable ] [-AdditionalProperties ] [-Ids ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### Check @@ -38,7 +35,6 @@ Confirm-MgDirectoryObjectMemberObject -DirectoryObjectId [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### CheckViaIdentityExpanded @@ -48,7 +44,7 @@ Confirm-MgDirectoryObjectMemberObject -InputObject [-ResponseHeadersVariable ] [-AdditionalProperties ] [-Ids ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### CheckViaIdentity @@ -59,7 +55,6 @@ Confirm-MgDirectoryObjectMemberObject -InputObject [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -71,13 +66,15 @@ This cmdlet has the following aliases, Invoke action checkMemberObjects -**Permissions** +## EXAMPLES + +### EXAMPLE 1 + +{{ Add code here }} + +### EXAMPLE 2 -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Application.Read.All, User.ReadWrite.All, Directory.Read.All, User.Read, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, Application.ReadWrite.All, Device.Read.All, AgentIdUser.ReadWrite.IdentityParentedBy, AgentIdUser.ReadWrite.All, User.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Application.Read.All, AgentIdUser.ReadWrite.IdentityParentedBy, User.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, User.ReadWrite.All, Device.ReadWrite.All, Device.Read.All, Application.ReadWrite.All, Directory.Read.All, AgentIdUser.ReadWrite.All, | +{{ Add code here }} ## PARAMETERS @@ -110,7 +107,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -271,7 +268,7 @@ HelpMessage: '' ### -Ids - +. ```yaml Type: System.String[] @@ -465,11 +462,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [Ids ]: -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -477,27 +474,4 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Confirm-MgDirectoryObjectMemberObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject) - - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index 45a91ae79830d..141e21620bf34 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObject --- @@ -15,9 +15,6 @@ title: Get-MgDirectoryObject Retrieve the properties and relationships of a directoryObject object. -> [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObject?view=graph-powershell-beta) - ## SYNTAX ### List (Default) @@ -28,7 +25,7 @@ Get-MgDirectoryObject [-ExpandProperty ] [-Property ] [-Filt [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-PageSize ] [-All] - [-CountVariable ] [] + [-CountVariable ] ``` ### Get @@ -37,7 +34,7 @@ Get-MgDirectoryObject [-ExpandProperty ] [-Property ] [-Filt Get-MgDirectoryObject -DirectoryObjectId [-ExpandProperty ] [-Property ] [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] ``` ### GetViaIdentity @@ -46,7 +43,7 @@ Get-MgDirectoryObject -DirectoryObjectId [-ExpandProperty ] Get-MgDirectoryObject -InputObject [-ExpandProperty ] [-Property ] [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] ``` ## ALIASES @@ -58,27 +55,14 @@ This cmdlet has the following aliases, Retrieve the properties and relationships of a directoryObject object. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Directory.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Directory.Read.All, | - ## EXAMPLES -### Example 1: Code snippet -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects Get-MgDirectoryObject -DirectoryObjectId $directoryObjectId -``` -This example shows how to use the Get-MgDirectoryObject Cmdlet. - - ## PARAMETERS ### -All @@ -561,7 +545,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -569,27 +553,5 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Get-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject) +- [](https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index 657b0e3dc23a6..1392d2bf9ceeb 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectavailableextensionproperty Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObjectAvailableExtensionProperty --- @@ -25,7 +25,6 @@ Get-MgDirectoryObjectAvailableExtensionProperty [-ResponseHeadersVariable ] [-IsSyncedFromOnPremises] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Get @@ -36,7 +35,6 @@ Get-MgDirectoryObjectAvailableExtensionProperty [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -49,18 +47,9 @@ This cmdlet has the following aliases, Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Directory.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Directory.Read.All, | - ## EXAMPLES -### Example 1: Code snippet -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -69,10 +58,6 @@ $params = @{ Get-MgDirectoryObjectAvailableExtensionProperty -BodyParameter $params -``` -This example shows how to use the Get-MgDirectoryObjectAvailableExtensionProperty Cmdlet. - - ## PARAMETERS ### -AdditionalProperties @@ -98,7 +83,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -226,7 +211,7 @@ HelpMessage: '' ### -IsSyncedFromOnPremises - +. ```yaml Type: System.Management.Automation.SwitchParameter @@ -382,34 +367,12 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [IsSyncedFromOnPremises ]: ## RELATED LINKS -- [Get-MgDirectoryObjectAvailableExtensionProperty](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectavailableextensionproperty) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectavailableextensionproperty) +- [](https://learn.microsoft.com/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md index 845241a662908..f0fa239c328d1 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectbyid Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObjectById --- @@ -17,9 +17,6 @@ Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: -> [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectById](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectById?view=graph-powershell-beta) - ## SYNTAX ### GetExpanded (Default) @@ -29,7 +26,6 @@ Get-MgDirectoryObjectById [-ResponseHeadersVariable ] [-AdditionalProper [-Ids ] [-Types ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Get @@ -40,7 +36,6 @@ Get-MgDirectoryObjectById [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -54,18 +49,9 @@ Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Directory.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Directory.Read.All, | - ## EXAMPLES -### Example 1: Code snippet -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -85,10 +71,6 @@ types = @( Get-MgDirectoryObjectById -BodyParameter $params -``` -This example shows how to use the Get-MgDirectoryObjectById Cmdlet. - - ## PARAMETERS ### -AdditionalProperties @@ -114,7 +96,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -242,7 +224,7 @@ HelpMessage: '' ### -Ids - +. ```yaml Type: System.String[] @@ -348,7 +330,7 @@ HelpMessage: '' ### -Types - +. ```yaml Type: System.String[] @@ -419,7 +401,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [Ids ]: [Types ]: @@ -427,27 +409,5 @@ BODYPARAMETER ` [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectCount](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectCount?view=graph-powershell-beta) - ## SYNTAX ### Get (Default) @@ -26,7 +23,7 @@ Get the number of the resource Get-MgDirectoryObjectCount -ConsistencyLevel [-Filter ] [-Search ] [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] ``` ## ALIASES @@ -38,6 +35,16 @@ This cmdlet has the following aliases, Get the number of the resource +## EXAMPLES + +### EXAMPLE 1 + +{{ Add code here }} + +### EXAMPLE 2 + +{{ Add code here }} + ## PARAMETERS ### -Break @@ -296,27 +303,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -- [Get-MgDirectoryObjectCount](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectcount) - - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectcount) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md index 9a72dad67e57a..5022554c16978 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectdelta Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObjectDelta --- @@ -16,9 +16,6 @@ title: Get-MgDirectoryObjectDelta Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. -> [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectDelta](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectDelta?view=graph-powershell-beta) - ## SYNTAX ### Delta (Default) @@ -29,7 +26,7 @@ Get-MgDirectoryObjectDelta [-ExpandProperty ] [-Filter ] [-Pro [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-PageSize ] [-All] - [-CountVariable ] [] + [-CountVariable ] ``` ## ALIASES @@ -42,59 +39,31 @@ This cmdlet has the following aliases, Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Directory.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Directory.Read.All, | - ## EXAMPLES -### Example 1: Retrieve changes for a collection of users and groups -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" - -``` -This example will retrieve changes for a collection of users and groups - -### Example 2: Retrieve a collection of changes for a directory object +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -```powershell +### EXAMPLE 2 Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "id eq '87d349ed-44d7-43e1-9a83-5f2406dee5bd'" - -``` -This example will retrieve a collection of changes for a directory object +Get-MgDirectoryObjectDelta -Filter "id eq '87d349ed-44d7-43e1-9a83-5f2406dee5bd'" -### Example 3: Retrieve changes to specific properties for a collection of users and groups - -```powershell +### EXAMPLE 3 Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" -``` -This example will retrieve changes to specific properties for a collection of users and groups - -### Example 4: Retrieve specific properties only if they changed for a collection of users and groups - -```powershell +### EXAMPLE 4 Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" - -``` -This example will retrieve specific properties only if they changed for a collection of users and groups - +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" ## PARAMETERS @@ -506,27 +475,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -- [Get-MgDirectoryObjectDelta](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectdelta) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-delta?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectdelta) +- [](https://learn.microsoft.com/graph/api/directoryobject-delta?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md index 2f2090e0e4830..f424fa01b88b1 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObjectMemberGroup --- @@ -19,9 +19,6 @@ This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. -> [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectMemberGroup](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectMemberGroup?view=graph-powershell-beta) - ## SYNTAX ### GetExpanded (Default) @@ -31,7 +28,6 @@ Get-MgDirectoryObjectMemberGroup -DirectoryObjectId [-ResponseHeadersVa [-AdditionalProperties ] [-SecurityEnabledOnly] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Get @@ -42,7 +38,6 @@ Get-MgDirectoryObjectMemberGroup -DirectoryObjectId [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### GetViaIdentityExpanded @@ -52,7 +47,7 @@ Get-MgDirectoryObjectMemberGroup -InputObject [-ResponseHeadersVariable ] [-AdditionalProperties ] [-SecurityEnabledOnly] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### GetViaIdentity @@ -63,7 +58,6 @@ Get-MgDirectoryObjectMemberGroup -InputObject [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -79,18 +73,9 @@ This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Application.Read.All, User.Read.All, Group.ReadWrite.All, GroupMember.Read.All, Application.ReadWrite.All, Device.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Application.Read.All, Application.ReadWrite.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, User.Read.All, Device.ReadWrite.All, Device.Read.All, Directory.Read.All, | - ## EXAMPLES -### Example 1: Check group memberships for a directory object -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -100,10 +85,6 @@ $params = @{ Get-MgDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params -``` -This example will check group memberships for a directory object - - ## PARAMETERS ### -AdditionalProperties @@ -135,7 +116,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -409,7 +390,7 @@ HelpMessage: '' ### -SecurityEnabledOnly - +. ```yaml Type: System.Management.Automation.SwitchParameter @@ -490,11 +471,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [SecurityEnabledOnly ]: -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -502,27 +483,5 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Get-MgDirectoryObjectMemberGroup](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup) +- [](https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index 7022045473365..871a2d607e95d 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Get-MgDirectoryObjectMemberObject --- @@ -13,12 +13,9 @@ title: Get-MgDirectoryObjectMemberObject ## SYNOPSIS -Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. +Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. -> [!NOTE] -> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectMemberObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectMemberObject?view=graph-powershell-beta) - ## SYNTAX ### GetExpanded (Default) @@ -28,7 +25,6 @@ Get-MgDirectoryObjectMemberObject -DirectoryObjectId [-ResponseHeadersV [-AdditionalProperties ] [-SecurityEnabledOnly] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Get @@ -39,7 +35,6 @@ Get-MgDirectoryObjectMemberObject -DirectoryObjectId [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### GetViaIdentityExpanded @@ -49,7 +44,7 @@ Get-MgDirectoryObjectMemberObject -InputObject [-ResponseHeadersVariable ] [-AdditionalProperties ] [-SecurityEnabledOnly] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### GetViaIdentity @@ -60,7 +55,6 @@ Get-MgDirectoryObjectMemberObject -InputObject [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -70,21 +64,12 @@ This cmdlet has the following aliases, ## DESCRIPTION -Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. +Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Application.Read.All, User.ReadWrite.All, Directory.Read.All, User.Read, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, Application.ReadWrite.All, Device.Read.All, AgentIdUser.ReadWrite.IdentityParentedBy, AgentIdUser.ReadWrite.All, User.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Application.Read.All, AgentIdUser.ReadWrite.IdentityParentedBy, User.Read.All, GroupMember.Read.All, Group.ReadWrite.All, Group.Read.All, Directory.ReadWrite.All, User.ReadWrite.All, Device.ReadWrite.All, Device.Read.All, Application.ReadWrite.All, Directory.Read.All, AgentIdUser.ReadWrite.All, | - ## EXAMPLES -### Example 1: Code snippet -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -94,10 +79,6 @@ $params = @{ Get-MgDirectoryObjectMemberObject -DirectoryObjectId $directoryObjectId -BodyParameter $params -``` -This example shows how to use the Get-MgDirectoryObjectMemberObject Cmdlet. - - ## PARAMETERS ### -AdditionalProperties @@ -129,7 +110,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -403,7 +384,7 @@ HelpMessage: '' ### -SecurityEnabledOnly - +. ```yaml Type: System.Management.Automation.SwitchParameter @@ -484,11 +465,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [SecurityEnabledOnly ]: -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -496,27 +477,5 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Get-MgDirectoryObjectMemberObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject) +- [](https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md index 65e33929bc5e3..f4c489eaf296c 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md @@ -1,6 +1,6 @@ --- Module Name: Microsoft.Graph.DirectoryObjects -Module Guid: e1f819c7-3874-4c21-a739-1cf44bf2fd46 +Module Guid: 1cce2304-0173-44c5-99f4-a3230bb6e155 Download Help Link: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.directoryobjects/?view=graph-powershell-1.0 Help Version: 1.0.0.0 Locale: en-US @@ -39,22 +39,3 @@ Microsoft Graph PowerShell Cmdlets ### [Update-MgDirectoryObject](Update-MgDirectoryObject.md) - - - - - - - - - - - - - - - - - - - diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md index 7324e398065de..78f7ef791910a 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: New-MgDirectoryObject --- @@ -15,9 +15,6 @@ title: New-MgDirectoryObject Add new entity to directoryObjects -> [!NOTE] -> To view the beta release of this cmdlet, view [New-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/New-MgBetaDirectoryObject?view=graph-powershell-beta) - ## SYNTAX ### CreateExpanded (Default) @@ -27,7 +24,6 @@ New-MgDirectoryObject [-ResponseHeadersVariable ] [-AdditionalProperties [-DeletedDateTime ] [-Id ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Create @@ -37,7 +33,6 @@ New-MgDirectoryObject -BodyParameter [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -49,6 +44,16 @@ This cmdlet has the following aliases, Add new entity to directoryObjects +## EXAMPLES + +### EXAMPLE 1 + +{{ Add code here }} + +### EXAMPLE 2 + +{{ Add code here }} + ## PARAMETERS ### -AdditionalProperties @@ -381,7 +386,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: directoryObject +BODYPARAMETER : directoryObject [(Any) ]: This indicates any property can be added to this object. [Id ]: The unique identifier for an entity. Read-only. @@ -391,27 +396,4 @@ Always null when the object hasn't been deleted. ## RELATED LINKS -- [New-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject) - - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md index 55900782a8230..0a8de8785f569 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Remove-MgDirectoryObject --- @@ -15,9 +15,6 @@ title: Remove-MgDirectoryObject Delete a directory object, for example, a group, user, application, or service principal. -> [!NOTE] -> To view the beta release of this cmdlet, view [Remove-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Remove-MgBetaDirectoryObject?view=graph-powershell-beta) - ## SYNTAX ### Delete (Default) @@ -27,7 +24,6 @@ Remove-MgDirectoryObject -DirectoryObjectId [-IfMatch ] [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### DeleteViaIdentity @@ -37,7 +33,6 @@ Remove-MgDirectoryObject -InputObject [-IfMatch ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -50,18 +45,13 @@ This cmdlet has the following aliases, Delete a directory object, for example, a group, user, application, or service principal. ## EXAMPLES -### Example 1: Code snippet -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects Remove-MgDirectoryObject -DirectoryObjectId $directoryObjectId -``` -This example shows how to use the Remove-MgDirectoryObject Cmdlet. - - ## PARAMETERS ### -Break @@ -392,7 +382,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -400,27 +390,5 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Remove-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject) -- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-delete?view=graph-rest-1.0) - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject) +- [](https://learn.microsoft.com/graph/api/directoryobject-delete?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index e2131de939d02..b52669816cebf 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -4,7 +4,7 @@ external help file: Microsoft.Graph.DirectoryObjects-Help.xml HelpUri: https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/test-mgdirectoryobjectproperty Locale: en-US Module Name: Microsoft.Graph.DirectoryObjects -ms.date: 06/05/2026 +ms.date: 07/31/2026 PlatyPS schema version: 2024-05-01 title: Test-MgDirectoryObjectProperty --- @@ -16,17 +16,14 @@ title: Test-MgDirectoryObjectProperty Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. -The following policy validations are performed for the display name and mail nickname properties:\r1. -Validate the prefix and suffix naming policy\r2. -Validate the custom banned words policy\r3. +The following policy validations are performed for the display name and mail nickname properties:\r\n1. +Validate the prefix and suffix naming policy\r\n2. +Validate the custom banned words policy\r\n3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. -> [!NOTE] -> To view the beta release of this cmdlet, view [Test-MgBetaDirectoryObjectProperty](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Test-MgBetaDirectoryObjectProperty?view=graph-powershell-beta) - ## SYNTAX ### ValidateExpanded (Default) @@ -37,7 +34,6 @@ Test-MgDirectoryObjectProperty [-ResponseHeadersVariable ] [-MailNickname ] [-OnBehalfOfUserId ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### Validate @@ -48,7 +44,6 @@ Test-MgDirectoryObjectProperty [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-PassThru] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ## ALIASES @@ -61,26 +56,17 @@ This cmdlet has the following aliases, Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. -The following policy validations are performed for the display name and mail nickname properties:\r1. -Validate the prefix and suffix naming policy\r2. -Validate the custom banned words policy\r3. +The following policy validations are performed for the display name and mail nickname properties:\r\n1. +Validate the prefix and suffix naming policy\r\n2. +Validate the custom banned words policy\r\n3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. -**Permissions** - -| Permission type | Permissions (from least to most privileged) | -| --------------- | ------------------------------------------ | -| Delegated (work or school account) | Group.Read.All, Directory.ReadWrite.All, Directory.Read.All, | -| Delegated (personal Microsoft account) | Not supported | -| Application | Group.Read.All, Group.ReadWrite.All, Directory.ReadWrite.All, Directory.Read.All, | - ## EXAMPLES -### Example 1: A successful validation request -```powershell +### EXAMPLE 1 Import-Module Microsoft.Graph.DirectoryObjects @@ -93,12 +79,7 @@ $params = @{ Test-MgDirectoryObjectProperty -BodyParameter $params -``` -This example will a successful validation request - -### Example 2: An unsuccessful validation request - -```powershell +### EXAMPLE 2 Import-Module Microsoft.Graph.DirectoryObjects @@ -111,10 +92,6 @@ $params = @{ Test-MgDirectoryObjectProperty -BodyParameter $params -``` -This example will an unsuccessful validation request - - ## PARAMETERS ### -AdditionalProperties @@ -140,7 +117,7 @@ HelpMessage: '' ### -BodyParameter - +. To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -205,7 +182,7 @@ HelpMessage: '' ### -DisplayName - +. ```yaml Type: System.String @@ -226,7 +203,7 @@ HelpMessage: '' ### -EntityType - +. ```yaml Type: System.String @@ -310,7 +287,7 @@ HelpMessage: '' ### -MailNickname - +. ```yaml Type: System.String @@ -331,7 +308,7 @@ HelpMessage: '' ### -OnBehalfOfUserId - +. ```yaml Type: System.String @@ -508,7 +485,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: . +BODYPARAMETER : . [(Any) ]: This indicates any property can be added to this object. [DisplayName ]: [EntityType ]: @@ -518,27 +495,5 @@ BODYPARAMETER ` [!NOTE] -> To view the beta release of this cmdlet, view [Update-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Update-MgBetaDirectoryObject?view=graph-powershell-beta) - ## SYNTAX ### UpdateExpanded (Default) @@ -27,7 +24,7 @@ Update-MgDirectoryObject -DirectoryObjectId [-ResponseHeadersVariable < [-AdditionalProperties ] [-DeletedDateTime ] [-Id ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ### Update @@ -37,7 +34,6 @@ Update-MgDirectoryObject -DirectoryObjectId -BodyParameter ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### UpdateViaIdentityExpanded @@ -48,7 +44,6 @@ Update-MgDirectoryObject -InputObject [-DeletedDateTime ] [-Id ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] ``` ### UpdateViaIdentity @@ -58,7 +53,7 @@ Update-MgDirectoryObject -InputObject -BodyParameter [-ResponseHeadersVariable ] [-Break] [-Headers ] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] ``` ## ALIASES @@ -70,6 +65,16 @@ This cmdlet has the following aliases, Update entity in directoryObjects +## EXAMPLES + +### EXAMPLE 1 + +{{ Add code here }} + +### EXAMPLE 2 + +{{ Add code here }} + ## PARAMETERS ### -AdditionalProperties @@ -485,14 +490,14 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER ``: directoryObject +BODYPARAMETER : directoryObject [(Any) ]: This indicates any property can be added to this object. [Id ]: The unique identifier for an entity. Read-only. [DeletedDateTime ]: Date and time when this object was deleted. Always null when the object hasn't been deleted. -INPUTOBJECT ``: Identity Parameter +INPUTOBJECT : Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -500,27 +505,4 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [Update-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/update-mgdirectoryobject) - - - - - - - - - - - - - - - - - - - - - - - +- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/update-mgdirectoryobject) From 60fba3cbf205b31a10a64f5c318dcedb26b5adcb Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:14:13 +0000 Subject: [PATCH 11/17] Escaped disallowed html tags --- .../Confirm-MgDirectoryObjectMemberGroup.md | 30 +++++++++++++--- .../Confirm-MgDirectoryObjectMemberObject.md | 26 ++++++++++++-- .../Get-MgDirectoryObject.md | 24 ++++++++++++- ...rectoryObjectAvailableExtensionProperty.md | 24 ++++++++++++- .../Get-MgDirectoryObjectById.md | 24 ++++++++++++- .../Get-MgDirectoryObjectCount.md | 22 ++++++++++++ .../Get-MgDirectoryObjectDelta.md | 22 ++++++++++++ .../Get-MgDirectoryObjectMemberGroup.md | 26 ++++++++++++-- .../Get-MgDirectoryObjectMemberObject.md | 30 +++++++++++++--- .../Microsoft.Graph.DirectoryObjects.md | 19 ++++++++++ .../New-MgDirectoryObject.md | 24 ++++++++++++- .../Remove-MgDirectoryObject.md | 24 ++++++++++++- .../Test-MgDirectoryObjectProperty.md | 36 +++++++++++++++---- .../Update-MgDirectoryObject.md | 26 ++++++++++++-- 14 files changed, 331 insertions(+), 26 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index c9dfdca143253..e3489f23077c1 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -14,7 +14,7 @@ title: Confirm-MgDirectoryObjectMemberGroup ## SYNOPSIS Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. -The specified object can be of one of the following types:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. +The specified object can be of one of the following types:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. @@ -68,7 +68,7 @@ This cmdlet has the following aliases, ## DESCRIPTION Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. -The specified object can be of one of the following types:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. +The specified object can be of one of the following types:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. @@ -477,11 +477,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [GroupIds ]: -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -491,3 +491,25 @@ INPUTOBJECT : Identity Parameter - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup) - [](https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 4de2e6ecc4815..48a588522c991 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -462,11 +462,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [Ids ]: -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -475,3 +475,25 @@ INPUTOBJECT : Identity Parameter ## RELATED LINKS - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index 141e21620bf34..b6a9c68d216ba 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -545,7 +545,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -555,3 +555,25 @@ INPUTOBJECT : Identity Parameter - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject) - [](https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index 1392d2bf9ceeb..90d01f017f787 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -367,7 +367,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [IsSyncedFromOnPremises ]: @@ -376,3 +376,25 @@ BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [Ids ]: [Types ]: @@ -411,3 +411,25 @@ BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [SecurityEnabledOnly ]: -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -485,3 +485,25 @@ INPUTOBJECT : Identity Parameter - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup) - [](https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index 871a2d607e95d..d5d2c3d9a9309 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -13,7 +13,7 @@ title: Get-MgDirectoryObjectMemberObject ## SYNOPSIS -Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. +Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## SYNTAX @@ -64,7 +64,7 @@ This cmdlet has the following aliases, ## DESCRIPTION -Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r\n- user\r\n- group\r\n- service principal\r\n- organizational contact\r\n- device\r\n- directory object This function is transitive. +Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## EXAMPLES @@ -465,11 +465,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [SecurityEnabledOnly ]: -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -479,3 +479,25 @@ INPUTOBJECT : Identity Parameter - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject) - [](https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md index f4c489eaf296c..ad777b1e785a9 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Microsoft.Graph.DirectoryObjects.md @@ -39,3 +39,22 @@ Microsoft Graph PowerShell Cmdlets ### [Update-MgDirectoryObject](Update-MgDirectoryObject.md) + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md index 78f7ef791910a..2437c2d3fa92c 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md @@ -386,7 +386,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : directoryObject +BODYPARAMETER ``: directoryObject [(Any) ]: This indicates any property can be added to this object. [Id ]: The unique identifier for an entity. Read-only. @@ -397,3 +397,25 @@ Always null when the object hasn't been deleted. ## RELATED LINKS - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md index 0a8de8785f569..760f0da754027 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md @@ -382,7 +382,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -392,3 +392,25 @@ INPUTOBJECT : Identity Parameter - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject) - [](https://learn.microsoft.com/graph/api/directoryobject-delete?view=graph-rest-1.0) + + + + + + + + + + + + + + + + + + + + + + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index b52669816cebf..5c4ddc9be4f8b 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -16,9 +16,9 @@ title: Test-MgDirectoryObjectProperty Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. -The following policy validations are performed for the display name and mail nickname properties:\r\n1. -Validate the prefix and suffix naming policy\r\n2. -Validate the custom banned words policy\r\n3. +The following policy validations are performed for the display name and mail nickname properties:\r1. +Validate the prefix and suffix naming policy\r2. +Validate the custom banned words policy\r3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. @@ -56,9 +56,9 @@ This cmdlet has the following aliases, Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. -The following policy validations are performed for the display name and mail nickname properties:\r\n1. -Validate the prefix and suffix naming policy\r\n2. -Validate the custom banned words policy\r\n3. +The following policy validations are performed for the display name and mail nickname properties:\r1. +Validate the prefix and suffix naming policy\r2. +Validate the custom banned words policy\r3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. @@ -485,7 +485,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. -BODYPARAMETER : . +BODYPARAMETER ``: . [(Any) ]: This indicates any property can be added to this object. [DisplayName ]: [EntityType ]: @@ -497,3 +497,25 @@ BODYPARAMETER : directoryObject +BODYPARAMETER ``: directoryObject [(Any) ]: This indicates any property can be added to this object. [Id ]: The unique identifier for an entity. Read-only. [DeletedDateTime ]: Date and time when this object was deleted. Always null when the object hasn't been deleted. -INPUTOBJECT : Identity Parameter +INPUTOBJECT ``: Identity Parameter [CertificateAuthorityDetailId ]: The unique identifier of certificateAuthorityDetail [CertificateBasedAuthPkiId ]: The unique identifier of certificateBasedAuthPki [DirectoryObjectId ]: The unique identifier of directoryObject @@ -506,3 +506,25 @@ INPUTOBJECT : Identity Parameter ## RELATED LINKS - [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/update-mgdirectoryobject) + + + + + + + + + + + + + + + + + + + + + + From a219f1561e2d5a7831c8db21fb4589e21c4068eb Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:05 +0000 Subject: [PATCH 12/17] Inserted permissions Table --- .../Confirm-MgDirectoryObjectMemberGroup.md | 8 ++++++++ .../Confirm-MgDirectoryObjectMemberObject.md | 8 ++++++++ .../Get-MgDirectoryObject.md | 8 ++++++++ .../Get-MgDirectoryObjectAvailableExtensionProperty.md | 8 ++++++++ .../Get-MgDirectoryObjectById.md | 8 ++++++++ .../Get-MgDirectoryObjectDelta.md | 8 ++++++++ .../Get-MgDirectoryObjectMemberGroup.md | 8 ++++++++ .../Get-MgDirectoryObjectMemberObject.md | 8 ++++++++ .../Test-MgDirectoryObjectProperty.md | 8 ++++++++ 9 files changed, 72 insertions(+) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index e3489f23077c1..852c5a3547a86 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -73,6 +73,14 @@ You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 48a588522c991..25396bdc56593 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -66,6 +66,14 @@ This cmdlet has the following aliases, Invoke action checkMemberObjects +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read, User.Read.All, User.ReadWrite.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index b6a9c68d216ba..275b6bd805b1a 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -55,6 +55,14 @@ This cmdlet has the following aliases, Retrieve the properties and relationships of a directoryObject object. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Directory.Read.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Directory.Read.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index 90d01f017f787..40f487240db51 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -47,6 +47,14 @@ This cmdlet has the following aliases, Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Directory.Read.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Directory.Read.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md index 6757123a9d64f..c02a8695da704 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md @@ -49,6 +49,14 @@ Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Directory.Read.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Directory.Read.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md index 75e361bc17281..23a8aeae51d8a 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md @@ -39,6 +39,14 @@ This cmdlet has the following aliases, Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Directory.Read.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Directory.Read.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md index d202c5aa72027..c4127b46a20a1 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md @@ -73,6 +73,14 @@ This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Application.Read.All, Application.ReadWrite.All, Device.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Application.Read.All, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index d5d2c3d9a9309..bd8c414be63cc 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -67,6 +67,14 @@ This cmdlet has the following aliases, Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read, User.Read.All, User.ReadWrite.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | + ## EXAMPLES ### EXAMPLE 1 diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index 5c4ddc9be4f8b..7a2ce84493658 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -64,6 +64,14 @@ If the properties fail multiple validations, only the first validation failure i However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. +**Permissions** + +| Permission type | Permissions (from least to most privileged) | +| --------------- | ------------------------------------------ | +| Delegated (work or school account) | Group.Read.All, Directory.Read.All, Directory.ReadWrite.All, | +| Delegated (personal Microsoft account) | Not supported | +| Application | Group.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.ReadWrite.All, | + ## EXAMPLES ### EXAMPLE 1 From 04f59dfc1be581819bdab2ad12d4480a749d015a Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:15 +0000 Subject: [PATCH 13/17] Updated metadata parameters --- .../Confirm-MgDirectoryObjectMemberGroup.md | 3 +++ .../Confirm-MgDirectoryObjectMemberObject.md | 3 +++ .../Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md | 3 +++ .../Get-MgDirectoryObjectById.md | 3 +++ .../Get-MgDirectoryObjectCount.md | 3 +++ .../Get-MgDirectoryObjectDelta.md | 3 +++ .../Get-MgDirectoryObjectMemberGroup.md | 3 +++ .../Get-MgDirectoryObjectMemberObject.md | 3 +++ .../Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md | 3 +++ .../Remove-MgDirectoryObject.md | 3 +++ .../Test-MgDirectoryObjectProperty.md | 3 +++ .../Update-MgDirectoryObject.md | 3 +++ 12 files changed, 36 insertions(+) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index 852c5a3547a86..c508bbcd73db7 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -19,6 +19,9 @@ You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. +> [!NOTE] +> To view the beta release of this cmdlet, view [Confirm-MgBetaDirectoryObjectMemberGroup](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Confirm-MgBetaDirectoryObjectMemberGroup?view=graph-powershell-beta) + ## SYNTAX ### CheckExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 25396bdc56593..42745faa9c78d 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -15,6 +15,9 @@ title: Confirm-MgDirectoryObjectMemberObject Invoke action checkMemberObjects +> [!NOTE] +> To view the beta release of this cmdlet, view [Confirm-MgBetaDirectoryObjectMemberObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Confirm-MgBetaDirectoryObjectMemberObject?view=graph-powershell-beta) + ## SYNTAX ### CheckExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index 275b6bd805b1a..0594eef0296cf 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -15,6 +15,9 @@ title: Get-MgDirectoryObject Retrieve the properties and relationships of a directoryObject object. +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObject?view=graph-powershell-beta) + ## SYNTAX ### List (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md index c02a8695da704..7c01c720d6878 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md @@ -17,6 +17,9 @@ Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectById](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectById?view=graph-powershell-beta) + ## SYNTAX ### GetExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md index 1201520e3ff16..10f5f42c97e2c 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md @@ -15,6 +15,9 @@ title: Get-MgDirectoryObjectCount Get the number of the resource +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectCount](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectCount?view=graph-powershell-beta) + ## SYNTAX ### Get (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md index 23a8aeae51d8a..2d0ea7d0e3d38 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md @@ -16,6 +16,9 @@ title: Get-MgDirectoryObjectDelta Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectDelta](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectDelta?view=graph-powershell-beta) + ## SYNTAX ### Delta (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md index c4127b46a20a1..bc6616c2b4d3f 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md @@ -19,6 +19,9 @@ This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectMemberGroup](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectMemberGroup?view=graph-powershell-beta) + ## SYNTAX ### GetExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index bd8c414be63cc..476f36b00140e 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -16,6 +16,9 @@ title: Get-MgDirectoryObjectMemberObject Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:\r- user\r- group\r- service principal\r- organizational contact\r- device\r- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. +> [!NOTE] +> To view the beta release of this cmdlet, view [Get-MgBetaDirectoryObjectMemberObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Get-MgBetaDirectoryObjectMemberObject?view=graph-powershell-beta) + ## SYNTAX ### GetExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md index 2437c2d3fa92c..45bf2b4573743 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md @@ -15,6 +15,9 @@ title: New-MgDirectoryObject Add new entity to directoryObjects +> [!NOTE] +> To view the beta release of this cmdlet, view [New-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/New-MgBetaDirectoryObject?view=graph-powershell-beta) + ## SYNTAX ### CreateExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md index 760f0da754027..b4568a75242ec 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md @@ -15,6 +15,9 @@ title: Remove-MgDirectoryObject Delete a directory object, for example, a group, user, application, or service principal. +> [!NOTE] +> To view the beta release of this cmdlet, view [Remove-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Remove-MgBetaDirectoryObject?view=graph-powershell-beta) + ## SYNTAX ### Delete (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index 7a2ce84493658..50dea4eb9e98a 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -24,6 +24,9 @@ If the properties fail multiple validations, only the first validation failure i However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. +> [!NOTE] +> To view the beta release of this cmdlet, view [Test-MgBetaDirectoryObjectProperty](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Test-MgBetaDirectoryObjectProperty?view=graph-powershell-beta) + ## SYNTAX ### ValidateExpanded (Default) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md index 457e609f6d7d8..aa5cf820da7c9 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md @@ -15,6 +15,9 @@ title: Update-MgDirectoryObject Update entity in directoryObjects +> [!NOTE] +> To view the beta release of this cmdlet, view [Update-MgBetaDirectoryObject](/powershell/module/Microsoft.Graph.Beta.DirectoryObjects/Update-MgBetaDirectoryObject?view=graph-powershell-beta) + ## SYNTAX ### UpdateExpanded (Default) From e81291337ac7b9c05278d611981e460e66ea5672 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:20 +0000 Subject: [PATCH 14/17] Repaired examples and descriptions --- .../Confirm-MgDirectoryObjectMemberGroup.md | 7 +++- .../Get-MgDirectoryObject.md | 7 +++- ...rectoryObjectAvailableExtensionProperty.md | 7 +++- .../Get-MgDirectoryObjectById.md | 7 +++- .../Get-MgDirectoryObjectDelta.md | 36 ++++++++++++++----- .../Get-MgDirectoryObjectMemberGroup.md | 7 +++- .../Get-MgDirectoryObjectMemberObject.md | 7 +++- .../Remove-MgDirectoryObject.md | 7 +++- .../Test-MgDirectoryObjectProperty.md | 14 ++++++-- 9 files changed, 82 insertions(+), 17 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index c508bbcd73db7..e22eb7db549c7 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -85,8 +85,9 @@ Because Microsoft 365 groups cannot contain other groups, membership in a Micros | Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | ## EXAMPLES +### Example 1: Check group memberships for a directory object -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -102,6 +103,10 @@ $params = @{ Confirm-MgDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params +``` +This example will check group memberships for a directory object + + ## PARAMETERS ### -AdditionalProperties diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index 0594eef0296cf..aff1e4d7206cf 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -67,13 +67,18 @@ Retrieve the properties and relationships of a directoryObject object. | Application | Directory.Read.All, | ## EXAMPLES +### Example 1: Code snippet -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects Get-MgDirectoryObject -DirectoryObjectId $directoryObjectId +``` +This example shows how to use the Get-MgDirectoryObject Cmdlet. + + ## PARAMETERS ### -All diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index 40f487240db51..dd526a74614de 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -56,8 +56,9 @@ The following entities support extension properties: | Application | Directory.Read.All, | ## EXAMPLES +### Example 1: Code snippet -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -66,6 +67,10 @@ $params = @{ Get-MgDirectoryObjectAvailableExtensionProperty -BodyParameter $params +``` +This example shows how to use the Get-MgDirectoryObjectAvailableExtensionProperty Cmdlet. + + ## PARAMETERS ### -AdditionalProperties diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md index 7c01c720d6878..092edcb7c6b73 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md @@ -61,8 +61,9 @@ Some common uses for this function are to: | Application | Directory.Read.All, | ## EXAMPLES +### Example 1: Code snippet -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -82,6 +83,10 @@ types = @( Get-MgDirectoryObjectById -BodyParameter $params +``` +This example shows how to use the Get-MgDirectoryObjectById Cmdlet. + + ## PARAMETERS ### -AdditionalProperties diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md index 2d0ea7d0e3d38..1340270604aa7 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectDelta.md @@ -51,30 +51,50 @@ For more information, see Use delta query to track changes in Microsoft Graph da | Application | Directory.Read.All, | ## EXAMPLES +### Example 1: Retrieve changes for a collection of users and groups -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -### EXAMPLE 2 +``` +This example will retrieve changes for a collection of users and groups + +### Example 2: Retrieve a collection of changes for a directory object + +```powershell Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "id eq '87d349ed-44d7-43e1-9a83-5f2406dee5bd'" +Get-MgDirectoryObjectDelta -Filter "id eq '87d349ed-44d7-43e1-9a83-5f2406dee5bd'" + +``` +This example will retrieve a collection of changes for a directory object + +### Example 3: Retrieve changes to specific properties for a collection of users and groups -### EXAMPLE 3 +```powershell Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" -### EXAMPLE 4 +``` +This example will retrieve changes to specific properties for a collection of users and groups + +### Example 4: Retrieve specific properties only if they changed for a collection of users and groups + +```powershell Import-Module Microsoft.Graph.DirectoryObjects -Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" +Get-MgDirectoryObjectDelta -Filter "isof('microsoft.graph.user') or isof('microsoft.graph.group')" -Property "microsoft.graph.user/surname,microsoft.graph.group/displayName" + +``` +This example will retrieve specific properties only if they changed for a collection of users and groups + ## PARAMETERS diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md index bc6616c2b4d3f..d9db025ae0075 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md @@ -85,8 +85,9 @@ If you get the DirectoryResultSizeLimitExceeded error code, use the List group t | Application | Application.Read.All, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, | ## EXAMPLES +### Example 1: Check group memberships for a directory object -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -96,6 +97,10 @@ $params = @{ Get-MgDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params +``` +This example will check group memberships for a directory object + + ## PARAMETERS ### -AdditionalProperties diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index 476f36b00140e..57ab8adeb23db 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -79,8 +79,9 @@ Only users and role-enabled groups can be members of directory roles. | Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | ## EXAMPLES +### Example 1: Code snippet -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -90,6 +91,10 @@ $params = @{ Get-MgDirectoryObjectMemberObject -DirectoryObjectId $directoryObjectId -BodyParameter $params +``` +This example shows how to use the Get-MgDirectoryObjectMemberObject Cmdlet. + + ## PARAMETERS ### -AdditionalProperties diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md index b4568a75242ec..d0a73fefa235d 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md @@ -48,13 +48,18 @@ This cmdlet has the following aliases, Delete a directory object, for example, a group, user, application, or service principal. ## EXAMPLES +### Example 1: Code snippet -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects Remove-MgDirectoryObject -DirectoryObjectId $directoryObjectId +``` +This example shows how to use the Remove-MgDirectoryObject Cmdlet. + + ## PARAMETERS ### -Break diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index 50dea4eb9e98a..6c307cd195f69 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -76,8 +76,9 @@ To learn more about configuring naming policies, see Configure naming policy. | Application | Group.Read.All, Directory.Read.All, Directory.ReadWrite.All, Group.ReadWrite.All, | ## EXAMPLES +### Example 1: A successful validation request -### EXAMPLE 1 +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -90,7 +91,12 @@ $params = @{ Test-MgDirectoryObjectProperty -BodyParameter $params -### EXAMPLE 2 +``` +This example will a successful validation request + +### Example 2: An unsuccessful validation request + +```powershell Import-Module Microsoft.Graph.DirectoryObjects @@ -103,6 +109,10 @@ $params = @{ Test-MgDirectoryObjectProperty -BodyParameter $params +``` +This example will an unsuccessful validation request + + ## PARAMETERS ### -AdditionalProperties From e563bc5b5c7c519dad1c0920b3be08d5c2626983 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:23 +0000 Subject: [PATCH 15/17] Remove boiler plate code injected by Autorest --- .../Confirm-MgDirectoryObjectMemberObject.md | 11 +---------- .../Get-MgDirectoryObjectCount.md | 11 +---------- .../New-MgDirectoryObject.md | 11 +---------- .../Update-MgDirectoryObject.md | 11 +---------- 4 files changed, 4 insertions(+), 40 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 42745faa9c78d..035f181faf719 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -77,16 +77,6 @@ Invoke action checkMemberObjects | Delegated (personal Microsoft account) | Not supported | | Application | Application.Read.All, AgentIdUser.ReadWrite.All, AgentIdUser.ReadWrite.IdentityParentedBy, Application.ReadWrite.All, Device.Read.All, Device.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, User.Read.All, User.ReadWrite.All, | -## EXAMPLES - -### EXAMPLE 1 - -{{ Add code here }} - -### EXAMPLE 2 - -{{ Add code here }} - ## PARAMETERS ### -AdditionalProperties @@ -506,5 +496,6 @@ INPUTOBJECT ``: Identity Parameter + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md index 10f5f42c97e2c..6c2b4c942d2ab 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectCount.md @@ -38,16 +38,6 @@ This cmdlet has the following aliases, Get the number of the resource -## EXAMPLES - -### EXAMPLE 1 - -{{ Add code here }} - -### EXAMPLE 2 - -{{ Add code here }} - ## PARAMETERS ### -Break @@ -327,5 +317,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md index 45bf2b4573743..1151c753cf5bb 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md @@ -47,16 +47,6 @@ This cmdlet has the following aliases, Add new entity to directoryObjects -## EXAMPLES - -### EXAMPLE 1 - -{{ Add code here }} - -### EXAMPLE 2 - -{{ Add code here }} - ## PARAMETERS ### -AdditionalProperties @@ -420,5 +410,6 @@ Always null when the object hasn't been deleted. + diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md index aa5cf820da7c9..7348704144dae 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Update-MgDirectoryObject.md @@ -68,16 +68,6 @@ This cmdlet has the following aliases, Update entity in directoryObjects -## EXAMPLES - -### EXAMPLE 1 - -{{ Add code here }} - -### EXAMPLE 2 - -{{ Add code here }} - ## PARAMETERS ### -AdditionalProperties @@ -529,5 +519,6 @@ INPUTOBJECT ``: Identity Parameter + From 81b25eb1364c74e134696ed17863353f45e7ed87 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:26 +0000 Subject: [PATCH 16/17] Removed invalid full stops from the beginning of lines --- .../Confirm-MgDirectoryObjectMemberGroup.md | 4 ++-- .../Confirm-MgDirectoryObjectMemberObject.md | 4 ++-- .../Get-MgDirectoryObjectAvailableExtensionProperty.md | 4 ++-- .../Get-MgDirectoryObjectById.md | 6 +++--- .../Get-MgDirectoryObjectMemberGroup.md | 4 ++-- .../Get-MgDirectoryObjectMemberObject.md | 4 ++-- .../Test-MgDirectoryObjectProperty.md | 10 +++++----- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index e22eb7db549c7..80bf34239642d 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -138,7 +138,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -236,7 +236,7 @@ HelpMessage: '' ### -GroupIds -. + ```yaml Type: System.String[] diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 035f181faf719..92ad18c49f979 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -108,7 +108,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -269,7 +269,7 @@ HelpMessage: '' ### -Ids -. + ```yaml Type: System.String[] diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index dd526a74614de..a70efcef3a802 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -96,7 +96,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -224,7 +224,7 @@ HelpMessage: '' ### -IsSyncedFromOnPremises -. + ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md index 092edcb7c6b73..b1abbd1fb0bfa 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectById.md @@ -112,7 +112,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -240,7 +240,7 @@ HelpMessage: '' ### -Ids -. + ```yaml Type: System.String[] @@ -346,7 +346,7 @@ HelpMessage: '' ### -Types -. + ```yaml Type: System.String[] diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md index d9db025ae0075..a9b6186e430a9 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberGroup.md @@ -132,7 +132,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -406,7 +406,7 @@ HelpMessage: '' ### -SecurityEnabledOnly -. + ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index 57ab8adeb23db..47a3d6b2fcbe6 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -126,7 +126,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -400,7 +400,7 @@ HelpMessage: '' ### -SecurityEnabledOnly -. + ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index 6c307cd195f69..78288756f9589 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -138,7 +138,7 @@ HelpMessage: '' ### -BodyParameter -. + To construct, see NOTES section for BODYPARAMETER properties and create a hash table. ```yaml @@ -203,7 +203,7 @@ HelpMessage: '' ### -DisplayName -. + ```yaml Type: System.String @@ -224,7 +224,7 @@ HelpMessage: '' ### -EntityType -. + ```yaml Type: System.String @@ -308,7 +308,7 @@ HelpMessage: '' ### -MailNickname -. + ```yaml Type: System.String @@ -329,7 +329,7 @@ HelpMessage: '' ### -OnBehalfOfUserId -. + ```yaml Type: System.String From 95d79c44fcf69e64a74460fa76bb2d2c5154e370 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 31 Jul 2026 19:27:40 +0000 Subject: [PATCH 17/17] Corrected related link to conform to the new platyps rules --- .../Confirm-MgDirectoryObjectMemberGroup.md | 4 ++-- .../Confirm-MgDirectoryObjectMemberObject.md | 2 +- .../Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md | 4 ++-- .../Get-MgDirectoryObjectAvailableExtensionProperty.md | 4 ++-- .../Get-MgDirectoryObjectById.md | 4 ++-- .../Get-MgDirectoryObjectCount.md | 2 +- .../Get-MgDirectoryObjectDelta.md | 4 ++-- .../Get-MgDirectoryObjectMemberGroup.md | 4 ++-- .../Get-MgDirectoryObjectMemberObject.md | 4 ++-- .../Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md | 2 +- .../Remove-MgDirectoryObject.md | 4 ++-- .../Test-MgDirectoryObjectProperty.md | 4 ++-- .../Update-MgDirectoryObject.md | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md index 80bf34239642d..d5d5094e6cd89 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberGroup.md @@ -505,8 +505,8 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup) -- [](https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0) +- [Confirm-MgDirectoryObjectMemberGroup](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmembergroup) +- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-checkmembergroups?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md index 92ad18c49f979..4961afed7002e 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Confirm-MgDirectoryObjectMemberObject.md @@ -475,7 +475,7 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject) +- [Confirm-MgDirectoryObjectMemberObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/confirm-mgdirectoryobjectmemberobject) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md index aff1e4d7206cf..abacf4ecb81a3 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObject.md @@ -569,8 +569,8 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject) -- [](https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0) +- [Get-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobject) +- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-get?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md index a70efcef3a802..ad4b68c4302c8 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectAvailableExtensionProperty.md @@ -387,8 +387,8 @@ BODYPARAMETER ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup) -- [](https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0) +- [Get-MgDirectoryObjectMemberGroup](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmembergroup) +- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-getmembergroups?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md index 47a3d6b2fcbe6..7688af151acc8 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Get-MgDirectoryObjectMemberObject.md @@ -493,8 +493,8 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject) -- [](https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0) +- [Get-MgDirectoryObjectMemberObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/get-mgdirectoryobjectmemberobject) +- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-getmemberobjects?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md index 1151c753cf5bb..1434eb645fc23 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/New-MgDirectoryObject.md @@ -389,7 +389,7 @@ Always null when the object hasn't been deleted. ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject) +- [New-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/new-mgdirectoryobject) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md index d0a73fefa235d..83aa69829d9a3 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Remove-MgDirectoryObject.md @@ -398,8 +398,8 @@ INPUTOBJECT ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject) -- [](https://learn.microsoft.com/graph/api/directoryobject-delete?view=graph-rest-1.0) +- [Remove-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/remove-mgdirectoryobject) +- [Graph API Reference](https://learn.microsoft.com/graph/api/directoryobject-delete?view=graph-rest-1.0) diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md index 78288756f9589..a5938e65591fc 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.DirectoryObjects/Test-MgDirectoryObjectProperty.md @@ -516,8 +516,8 @@ BODYPARAMETER ``: Identity Parameter ## RELATED LINKS -- [](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/update-mgdirectoryobject) +- [Update-MgDirectoryObject](https://learn.microsoft.com/powershell/module/microsoft.graph.directoryobjects/update-mgdirectoryobject)