From a443b1ad8678f06a70ea3e7067f0895bbf82b454 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Mon, 13 Jul 2026 15:56:54 -0700 Subject: [PATCH 1/2] fix: use x-access-token form for GitHub App token git push GitHub App installation tokens must authenticate as the password with username "x-access-token" (https://x-access-token:@github.com/...). The bare https://@github.com/... form only works for PATs, so once the PAT was removed from ADO the weekly pushes failed with "could not read Password ... terminal prompts disabled". Updates all five pipeline push URLs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b1e4dbfd-ffcd-4a3e-bd35-1632b2912252 --- .azure-pipelines/command-metadata-refresh.yml | 2 +- .azure-pipelines/common-templates/create-pr.yml | 2 +- .azure-pipelines/common-templates/download-openapi-docs.yml | 2 +- .../generation-templates/generate-command-metadata.yml | 2 +- .azure-pipelines/weekly-examples-update.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/command-metadata-refresh.yml b/.azure-pipelines/command-metadata-refresh.yml index 22931e33da..801e7ebd72 100644 --- a/.azure-pipelines/command-metadata-refresh.yml +++ b/.azure-pipelines/command-metadata-refresh.yml @@ -148,7 +148,7 @@ extends: git status git add "$(System.DefaultWorkingDirectory)/config/ModuleMetadata.json" git commit -m 'Bump module versions after metadata generation.' - git push "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" + git push "https://x-access-token:$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" git status - ${{ if eq(parameters.CreatePullRequest, true) }}: diff --git a/.azure-pipelines/common-templates/create-pr.yml b/.azure-pipelines/common-templates/create-pr.yml index 99b02c20f7..ac63a66b13 100644 --- a/.azure-pipelines/common-templates/create-pr.yml +++ b/.azure-pipelines/common-templates/create-pr.yml @@ -33,5 +33,5 @@ steps: git status gh auth login - git push "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" + git push "https://x-access-token:$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" gh pr create -t $Title -b $Body -B $BaseBranchName -H $Head diff --git a/.azure-pipelines/common-templates/download-openapi-docs.yml b/.azure-pipelines/common-templates/download-openapi-docs.yml index c814b5c29e..63287607f8 100644 --- a/.azure-pipelines/common-templates/download-openapi-docs.yml +++ b/.azure-pipelines/common-templates/download-openapi-docs.yml @@ -92,7 +92,7 @@ steps: git add . git commit -m 'Weekly OpenApiDocs Download.' git status - git push --set-upstream "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" $(Branch) + git push --set-upstream "https://x-access-token:$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" $(Branch) git status # References diff --git a/.azure-pipelines/generation-templates/generate-command-metadata.yml b/.azure-pipelines/generation-templates/generate-command-metadata.yml index 27911f97f0..cae724dff8 100644 --- a/.azure-pipelines/generation-templates/generate-command-metadata.yml +++ b/.azure-pipelines/generation-templates/generate-command-metadata.yml @@ -30,5 +30,5 @@ steps: git status git add "$(System.DefaultWorkingDirectory)/src/Authentication/Authentication/custom/common/MgCommandMetadata.json" git commit -m 'Add generated MgCommandMetadata.json. [run ci]' - git push "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" + git push "https://x-access-token:$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" git status diff --git a/.azure-pipelines/weekly-examples-update.yml b/.azure-pipelines/weekly-examples-update.yml index 674b08bb65..76a8efd247 100644 --- a/.azure-pipelines/weekly-examples-update.yml +++ b/.azure-pipelines/weekly-examples-update.yml @@ -96,7 +96,7 @@ extends: git status git add . git commit -m "Updating examples" - git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch) + git push --set-upstream "https://x-access-token:$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git" $(ComputeBranch.WeeklyExamplesBranch) git status - template: .azure-pipelines/common-templates/create-pr.yml@self parameters: From bd0fc59c34c8d7b43df9272f670b447766044618 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 14 Jul 2026 00:42:16 +0000 Subject: [PATCH 2/2] Updating examples --- ...taServicePrincipalSynchronizationTemplate.md | 11 +++++++++++ ...MgServicePrincipalSynchronizationTemplate.md | 11 ----------- ...ualEventTownhallRegistrationConfiguration.md | 11 +++++++++++ ...tAccessPackageApplicablePolicyRequirement.md | 17 ----------------- ...ssTenantAccessPolicyDefaultM365Capability.md | 11 +++++++++++ ...ssTenantAccessPolicyPartnerM365Capability.md | 11 +++++++++++ .../Get-MgPolicyOwnerlessGroupPolicy.md | 11 +++++++++++ .../v1.0/examples/Get-MgSecurityAlertV2.md | 15 +++++++++++++-- .../Get-MgChatTargetedMessageReplyDelta.md | 0 9 files changed, 68 insertions(+), 30 deletions(-) create mode 100644 src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallRegistrationConfiguration.md create mode 100644 src/Identity.SignIns/v1.0/examples/Get-MgPolicyOwnerlessGroupPolicy.md create mode 100644 src/Teams/v1.0/examples/Get-MgChatTargetedMessageReplyDelta.md diff --git a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md index e69de29bb2..d05037861a 100644 --- a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md +++ b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md @@ -0,0 +1,11 @@ +### Example + +```powershell + +Import-Module Microsoft.Graph.Beta.Applications + +Get-MgBetaServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId + +``` +This example shows how to use the Get-MgBetaServicePrincipalSynchronizationTemplate Cmdlet. + diff --git a/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md b/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md index ce3990f381..e69de29bb2 100644 --- a/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md +++ b/src/Applications/v1.0/examples/Get-MgServicePrincipalSynchronizationTemplate.md @@ -1,11 +0,0 @@ -### Example - -```powershell - -Import-Module Microsoft.Graph.Applications - -Get-MgServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId - -``` -This example shows how to use the Get-MgServicePrincipalSynchronizationTemplate Cmdlet. - diff --git a/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallRegistrationConfiguration.md b/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallRegistrationConfiguration.md new file mode 100644 index 0000000000..300eccf12b --- /dev/null +++ b/src/Bookings/beta/examples/Get-MgBetaVirtualEventTownhallRegistrationConfiguration.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Bookings + +Get-MgBetaVirtualEventTownhallRegistrationConfiguration -VirtualEventTownhallId $virtualEventTownhallId + +``` +This example shows how to use the Get-MgBetaVirtualEventTownhallRegistrationConfiguration Cmdlet. + diff --git a/src/Identity.Governance/beta/examples/Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement.md b/src/Identity.Governance/beta/examples/Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement.md index d0d0ad44a4..dc2047b1bd 100644 --- a/src/Identity.Governance/beta/examples/Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement.md +++ b/src/Identity.Governance/beta/examples/Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement.md @@ -9,20 +9,3 @@ Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement -AccessP ``` This example shows how to use the Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement Cmdlet. -### Example 2: Code snippet - -```powershell - -Import-Module Microsoft.Graph.Beta.Identity.Governance - -$params = @{ - subject = @{ - objectId = "5acd375c-8acb-45de-a958-fa0dd89259ad" - } -} - -Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement -AccessPackageId $accessPackageId -BodyParameter $params - -``` -This example shows how to use the Get-MgBetaEntitlementManagementAccessPackageApplicablePolicyRequirement Cmdlet. - diff --git a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md index e69de29bb2..8e4521af85 100644 --- a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md +++ b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability + +``` +This example shows how to use the Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability Cmdlet. + diff --git a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md index e69de29bb2..7c54ec2b8a 100644 --- a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md +++ b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability -CrossTenantAccessPolicyConfigurationPartnerTenantId $crossTenantAccessPolicyConfigurationPartnerTenantId + +``` +This example shows how to use the Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability Cmdlet. + diff --git a/src/Identity.SignIns/v1.0/examples/Get-MgPolicyOwnerlessGroupPolicy.md b/src/Identity.SignIns/v1.0/examples/Get-MgPolicyOwnerlessGroupPolicy.md new file mode 100644 index 0000000000..24c94d23c0 --- /dev/null +++ b/src/Identity.SignIns/v1.0/examples/Get-MgPolicyOwnerlessGroupPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Code snippet + +```powershell + +Import-Module Microsoft.Graph.Identity.SignIns + +Get-MgPolicyOwnerlessGroupPolicy + +``` +This example shows how to use the Get-MgPolicyOwnerlessGroupPolicy Cmdlet. + diff --git a/src/Security/v1.0/examples/Get-MgSecurityAlertV2.md b/src/Security/v1.0/examples/Get-MgSecurityAlertV2.md index 2d9c05f0e3..a5383dfe2d 100644 --- a/src/Security/v1.0/examples/Get-MgSecurityAlertV2.md +++ b/src/Security/v1.0/examples/Get-MgSecurityAlertV2.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Get all alerts ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Security Get-MgSecurityAlertV2 ``` -This example shows how to use the Get-MgSecurityAlertV2 Cmdlet. +This example will get all alerts + +### Example 2: Get all alerts from Microsoft Sentinel + +```powershell + +Import-Module Microsoft.Graph.Security + +Get-MgSecurityAlertV2 -Filter "serviceSource eq 'microsoftSentinel'" + +``` +This example will get all alerts from microsoft sentinel diff --git a/src/Teams/v1.0/examples/Get-MgChatTargetedMessageReplyDelta.md b/src/Teams/v1.0/examples/Get-MgChatTargetedMessageReplyDelta.md new file mode 100644 index 0000000000..e69de29bb2