From abdf277646b394af161692840a55e59ec80915c2 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 12 Jun 2026 04:07:09 +0000 Subject: [PATCH] Updating examples --- ...ServicePrincipalSynchronizationTemplate.md | 11 ---------- .../examples/Get-MgApplicationTemplate.md | 17 +++++++++++--- ...reventionWebApplicationFirewallProvider.md | 19 ++++++++++++++-- ...TenantAccessPolicyDefaultM365Capability.md | 0 ...TenantAccessPolicyPartnerM365Capability.md | 0 .../examples/Get-MgBetaSecurityAlertV2.md | 15 +++++++++++-- .../v1.0/examples/Complete-MgChatMigration.md | 22 +++++++++++++++++++ .../Complete-MgGroupTeamChannelMigration.md | 1 + ...lete-MgGroupTeamPrimaryChannelMigration.md | 1 + .../Complete-MgTeamChannelMigration.md | 15 +++++++++++-- .../Complete-MgTeamPrimaryChannelMigration.md | 1 + ...e-MgTeamworkDeletedTeamChannelMigration.md | 1 + .../examples/Complete-MgUserChatMigration.md | 1 + 13 files changed, 84 insertions(+), 20 deletions(-) create mode 100644 src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md create mode 100644 src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md create mode 100644 src/Teams/v1.0/examples/Complete-MgChatMigration.md create mode 100644 src/Teams/v1.0/examples/Complete-MgUserChatMigration.md diff --git a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md index d05037861a5..e69de29bb2d 100644 --- a/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md +++ b/src/Applications/beta/examples/Get-MgBetaServicePrincipalSynchronizationTemplate.md @@ -1,11 +0,0 @@ -### 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-MgApplicationTemplate.md b/src/Applications/v1.0/examples/Get-MgApplicationTemplate.md index fd41310dc86..5a0a0dfaae2 100644 --- a/src/Applications/v1.0/examples/Get-MgApplicationTemplate.md +++ b/src/Applications/v1.0/examples/Get-MgApplicationTemplate.md @@ -1,11 +1,22 @@ -### Example 1: Code snippet +### Example 1: Get application template ```powershell Import-Module Microsoft.Graph.Applications -Get-MgApplicationTemplate +Get-MgApplicationTemplate -ApplicationTemplateId $applicationTemplateId ``` -This example shows how to use the Get-MgApplicationTemplate Cmdlet. +This example will get application template + +### Example 2: Get application template with optional properties + +```powershell + +Import-Module Microsoft.Graph.Applications + +Get-MgApplicationTemplate -ApplicationTemplateId $applicationTemplateId -Property "id,displayName,riskScore,riskFactors" + +``` +This example will get application template with optional properties diff --git a/src/Identity.SignIns/beta/examples/Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md b/src/Identity.SignIns/beta/examples/Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md index 9dbe57e872c..4ddb7ae3edf 100644 --- a/src/Identity.SignIns/beta/examples/Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md +++ b/src/Identity.SignIns/beta/examples/Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Verify a specific webApplicationFirewallProvider object ```powershell @@ -11,5 +11,20 @@ $params = @{ Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId -BodyParameter $params ``` -This example shows how to use the Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider Cmdlet. +This example will verify a specific webapplicationfirewallprovider object + +### Example 2: Verify a specific webApplicationFirewallProviders object along with the details of their associated provider. + +```powershell + +Import-Module Microsoft.Graph.Beta.Identity.SignIns + +$params = @{ + hostName = "www.contoso.com" +} + +Confirm-MgBetaIdentityRiskPreventionWebApplicationFirewallProvider -WebApplicationFirewallProviderId $webApplicationFirewallProviderId -ExpandProperty "provider" -BodyParameter $params + +``` +This example will verify a specific webapplicationfirewallproviders object along with the details of their associated provider. diff --git a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md b/src/Identity.SignIns/beta/examples/Get-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/Security/beta/examples/Get-MgBetaSecurityAlertV2.md b/src/Security/beta/examples/Get-MgBetaSecurityAlertV2.md index e935127978e..08a82024bc6 100644 --- a/src/Security/beta/examples/Get-MgBetaSecurityAlertV2.md +++ b/src/Security/beta/examples/Get-MgBetaSecurityAlertV2.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Get all alerts ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Beta.Security Get-MgBetaSecurityAlertV2 ``` -This example shows how to use the Get-MgBetaSecurityAlertV2 Cmdlet. +This example will get all alerts + +### Example 2: Get all alerts from Microsoft Sentinel + +```powershell + +Import-Module Microsoft.Graph.Beta.Security + +Get-MgBetaSecurityAlertV2 -Filter "serviceSource eq 'microsoftSentinel'" + +``` +This example will get all alerts from microsoft sentinel diff --git a/src/Teams/v1.0/examples/Complete-MgChatMigration.md b/src/Teams/v1.0/examples/Complete-MgChatMigration.md new file mode 100644 index 00000000000..64008d0e726 --- /dev/null +++ b/src/Teams/v1.0/examples/Complete-MgChatMigration.md @@ -0,0 +1,22 @@ +### Example 1: Complete the migration of external messages in a chat + +```powershell + +Import-Module Microsoft.Graph.Teams + +Complete-MgChatMigration -ChatId $chatId + +``` +This example will complete the migration of external messages in a chat + +### Example 2: Complete the migration when a chat is already in migration mode + +```powershell + +Import-Module Microsoft.Graph.Teams + +Complete-MgChatMigration -ChatId $chatId + +``` +This example will complete the migration when a chat is already in migration mode + diff --git a/src/Teams/v1.0/examples/Complete-MgGroupTeamChannelMigration.md b/src/Teams/v1.0/examples/Complete-MgGroupTeamChannelMigration.md index e69de29bb2d..8b137891791 100644 --- a/src/Teams/v1.0/examples/Complete-MgGroupTeamChannelMigration.md +++ b/src/Teams/v1.0/examples/Complete-MgGroupTeamChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/v1.0/examples/Complete-MgGroupTeamPrimaryChannelMigration.md b/src/Teams/v1.0/examples/Complete-MgGroupTeamPrimaryChannelMigration.md index e69de29bb2d..8b137891791 100644 --- a/src/Teams/v1.0/examples/Complete-MgGroupTeamPrimaryChannelMigration.md +++ b/src/Teams/v1.0/examples/Complete-MgGroupTeamPrimaryChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/v1.0/examples/Complete-MgTeamChannelMigration.md b/src/Teams/v1.0/examples/Complete-MgTeamChannelMigration.md index f2edc8cdb32..e6cab5f9bc9 100644 --- a/src/Teams/v1.0/examples/Complete-MgTeamChannelMigration.md +++ b/src/Teams/v1.0/examples/Complete-MgTeamChannelMigration.md @@ -1,4 +1,4 @@ -### Example 1: Code snippet +### Example 1: Complete the migration when a channel is in migration mode ```powershell @@ -7,5 +7,16 @@ Import-Module Microsoft.Graph.Teams Complete-MgTeamChannelMigration -TeamId $teamId -ChannelId $channelId ``` -This example shows how to use the Complete-MgTeamChannelMigration Cmdlet. +This example will complete the migration when a channel is in migration mode + +### Example 2: Complete the migration when a channel isn't in migration mode + +```powershell + +Import-Module Microsoft.Graph.Teams + +Complete-MgTeamChannelMigration -TeamId $teamId -ChannelId $channelId + +``` +This example will complete the migration when a channel isn't in migration mode diff --git a/src/Teams/v1.0/examples/Complete-MgTeamPrimaryChannelMigration.md b/src/Teams/v1.0/examples/Complete-MgTeamPrimaryChannelMigration.md index e69de29bb2d..8b137891791 100644 --- a/src/Teams/v1.0/examples/Complete-MgTeamPrimaryChannelMigration.md +++ b/src/Teams/v1.0/examples/Complete-MgTeamPrimaryChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/v1.0/examples/Complete-MgTeamworkDeletedTeamChannelMigration.md b/src/Teams/v1.0/examples/Complete-MgTeamworkDeletedTeamChannelMigration.md index e69de29bb2d..8b137891791 100644 --- a/src/Teams/v1.0/examples/Complete-MgTeamworkDeletedTeamChannelMigration.md +++ b/src/Teams/v1.0/examples/Complete-MgTeamworkDeletedTeamChannelMigration.md @@ -0,0 +1 @@ + diff --git a/src/Teams/v1.0/examples/Complete-MgUserChatMigration.md b/src/Teams/v1.0/examples/Complete-MgUserChatMigration.md new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/src/Teams/v1.0/examples/Complete-MgUserChatMigration.md @@ -0,0 +1 @@ +