From b86a18ff18f4b4d1ba78169dea67b93f4bcf1acd Mon Sep 17 00:00:00 2001 From: Merill Fernando Date: Tue, 20 Jun 2023 20:03:48 +1000 Subject: [PATCH 1/2] Fixed non-working, autogenerated example and added a new one --- ...itlementManagementConnectedOrganization.md | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md b/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md index 6615b36b19b..f07376b5d18 100644 --- a/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md +++ b/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md @@ -1,19 +1,18 @@ -### Example 1: Using the New-MgEntitlementManagementConnectedOrganization Cmdlet +### Example 1: Add a connected organization using the DomainName parameter ```powershell -Import-Module Microsoft.Graph.Identity.Governance -$params = @{ - DisplayName = "Connected organization name" - Description = "Connected organization description" - IdentitySources = @( - @{ - "@odata.type" = "#microsoft.graph.domainIdentitySource" - DomainName = "example.com" - DisplayName = "example.com" - } - ) - State = "proposed" -} -New-MgEntitlementManagementConnectedOrganization -BodyParameter $params +New-MgBetaEntitlementManagementConnectedOrganization -DomainName microsoft.com +``` + +### Example 2: Add a connected organization using the IdentitySources parameter +```powershell +$identitySources = @( + @{ + '@odata.type' = '#microsoft.graph.domainIdentitySource'; + domainName = "microsoft.com"; + } +) + +New-MgEntitlementManagementConnectedOrganization -IdentitySources $identitySources ``` This example shows how to use the New-MgEntitlementManagementConnectedOrganization Cmdlet. To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference). From 3da13fc2e9f9517cafc544524fe6519c3f18499a Mon Sep 17 00:00:00 2001 From: Merill Fernando Date: Thu, 22 Jun 2023 21:41:24 +1000 Subject: [PATCH 2/2] Update New-MgEntitlementManagementConnectedOrganization.md --- ...itlementManagementConnectedOrganization.md | 51 ++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md b/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md index f07376b5d18..2dc92812b51 100644 --- a/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md +++ b/src/Identity.Governance/Identity.Governance/examples/v1.0-beta/New-MgEntitlementManagementConnectedOrganization.md @@ -1,18 +1,57 @@ -### Example 1: Add a connected organization using the DomainName parameter +### Example 1: Using the New-MgEntitlementManagementConnectedOrganization Cmdlet + +```powershell +$params = @{ + displayName = "Connected organization name" + description = "Connected organization description" + identitySources = @( + @{ + "@odata.type" = "#microsoft.graph.domainIdentitySource" + domainName = "example.com" + displayName = "example.com" + } + ) + state = "proposed" +} + +New-MgEntitlementManagementConnectedOrganization -BodyParameter $params +``` + +This example shows how to use the New-MgEntitlementManagementConnectedOrganization Cmdlet with the BodyParameter. + +### Example 2: Add a connected organization using the DomainName parameter in the 'Proposed' state + +```powershell +New-MgEntitlementManagementConnectedOrganization -DomainName microsoft.com -DisplayName "Microsoft" -State proposed +``` + +This example shows how to add a connected organization in the 'Proposed' state using the -DomainName and -State parameters. + +### Example 3: Add a connected organization using the DomainName parameter in the 'Configured' state + ```powershell -New-MgBetaEntitlementManagementConnectedOrganization -DomainName microsoft.com +New-MgEntitlementManagementConnectedOrganization -DomainName microsoft.com -DisplayName "Microsoft" -State configured ``` -### Example 2: Add a connected organization using the IdentitySources parameter +This example shows how to add a connected organization in the 'Configured' state using the -DomainName and -State parameters. + +### Example 4: Add a connected organization with multiple domains using the IdentitySources parameter + ```powershell $identitySources = @( @{ '@odata.type' = '#microsoft.graph.domainIdentitySource'; - domainName = "microsoft.com"; + domainName = "example1.com"; + }, + @{ + '@odata.type' = '#microsoft.graph.domainIdentitySource'; + domainName = "example2.com"; } ) -New-MgEntitlementManagementConnectedOrganization -IdentitySources $identitySources +New-MgEntitlementManagementConnectedOrganization -DisplayName "Example" -IdentitySources $identitySources -State configured ``` -This example shows how to use the New-MgEntitlementManagementConnectedOrganization Cmdlet. + +This example shows how to use the -IdentitySources parameter to add a connected organization with multiple domains. + To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).