Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Applications

Get-MgServicePrincipalSynchronizationTemplate -ServicePrincipalId $servicePrincipalId

```
This example shows how to use the Get-MgServicePrincipalSynchronizationTemplate Cmdlet.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Example 1: Code snippet
### Example 2: Create a subscription targeting a Web Push endpoint

```powershell

Expand All @@ -16,5 +16,5 @@ $params = @{
New-MgBetaSubscription -BodyParameter $params

```
This example shows how to use the New-MgBetaSubscription Cmdlet.
This example will create a subscription targeting a web push endpoint

21 changes: 21 additions & 0 deletions src/Groups/v1.0/examples/New-MgGroupSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,24 @@ New-MgGroupSetting -GroupId $groupId -BodyParameter $params
```
This example shows how to use the New-MgGroupSetting Cmdlet.

### Example 2: Code snippet

```powershell

Import-Module Microsoft.Graph.Groups

$params = @{
templateId = "7e0abea2-5c20-405f-9658-bfc9a523fd49"
values = @(
@{
name = "AllowToAddGuests"
value = "false"
}
)
}

New-MgGroupSetting -GroupId $groupId -BodyParameter $params

```
This example shows how to use the New-MgGroupSetting Cmdlet.

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

$params = @{
"@odata.type" = "#microsoft.graph.photoUpdateSettings"
source = "String"
source = "cloud"
allowedRoles = @(
"String"
)
)
}

Update-MgBetaAdminPeoplePhotoUpdateSetting -BodyParameter $params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ Update-MgBetaDirectorySetting -DirectorySettingId $directorySettingId -BodyParam
```
This example shows how to use the Update-MgBetaDirectorySetting Cmdlet.

### Example 2: Code snippet

```powershell

Import-Module Microsoft.Graph.Beta.Identity.DirectoryManagement

$params = @{
values = @(
@{
name = "EnableMIPLabels"
value = "true"
}
)
}

Update-MgBetaDirectorySetting -DirectorySettingId $directorySettingId -BodyParameter $params

```
This example shows how to use the Update-MgBetaDirectorySetting Cmdlet.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Import-Module Microsoft.Graph.Identity.DirectoryManagement

$params = @{
directoryPropertyName = "CustomAttribute1"
annotations = @(
@{
displayName = "Cost Center"
Expand All @@ -17,6 +16,8 @@ $params = @{
)
}
)
directoryPropertyName = "CustomAttribute1"
isVisible = $true
}

New-MgAdminPeopleProfileCardProperty -BodyParameter $params
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Example 1: Code snippet
### Example 1: List access review instances assigned directly or through delegation to the current user

```powershell

Expand All @@ -7,5 +7,27 @@ Import-Module Microsoft.Graph.Beta.Identity.Governance
Invoke-MgBetaFilterIdentityGovernanceAccessReviewDefinitionInstanceByCurrentUser -AccessReviewScheduleDefinitionId $accessReviewScheduleDefinitionId -On $onId

```
This example shows how to use the Invoke-MgBetaFilterIdentityGovernanceAccessReviewDefinitionInstanceByCurrentUser Cmdlet.
This example will list access review instances assigned directly or through delegation to the current user

### Example 2: List access review instances delegated to the current user

```powershell

Import-Module Microsoft.Graph.Beta.Identity.Governance

Invoke-MgBetaFilterIdentityGovernanceAccessReviewDefinitionInstanceByCurrentUser -AccessReviewScheduleDefinitionId $accessReviewScheduleDefinitionId -Property "id,displayName,status,delegatedBy"

```
This example will list access review instances delegated to the current user

### Example 3: List access review instances directly assigned to the current user

```powershell

Import-Module Microsoft.Graph.Beta.Identity.Governance

Invoke-MgBetaFilterIdentityGovernanceAccessReviewDefinitionInstanceByCurrentUser -AccessReviewScheduleDefinitionId $accessReviewScheduleDefinitionId -Property "id,displayName,status"

```
This example will list access review instances directly assigned to the current user

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $params = @{
}
callbackConfiguration = @{
"@odata.type" = "#microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration"
timeoutDuration = "PT5M"
timeoutDuration = "PT30M"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $params = @{
}
callbackConfiguration = @{
"@odata.type" = "#microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration"
timeoutDuration = "PT5M"
timeoutDuration = "PT30M"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Example 1: Code snippet

```powershell

Import-Module Microsoft.Graph.Identity.Governance

$params = @{
subjectLifecycle = "governed"
}

Update-MgEntitlementManagementSubjectByObjectId -BodyParameter $params -ObjectId $objectIdId

```
This example shows how to use the Update-MgEntitlementManagementSubjectByObjectId Cmdlet.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
### Example 1: Create a cross-tenant open profile card capability

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.crossTenantOpenProfileCard"
inboundAccess = @{
isAllowed = $true
resourceScopes = @{
included = @(
@{
resourceId = "ad4fc698-74dc-4f62-9e71-ba9b591e8e74"
resourceType = "group"
}
)
excluded = @(
@{
resourceId = "ad4fc698-74dc-4f62-9e71-ba9b591e8e00"
resourceType = "group"
}
)
}
}
}

New-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability -BodyParameter $params

```
This example will create a cross-tenant open profile card capability

### Example 2: Create a cross-tenant migration capability

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.crossTenantMigration"
inboundAccess = @{
isAllowed = $true
resourceScopes = @{
included = @(
@{
resourceId = "ad4fc698-74dc-4f62-9e71-ba9b591e8e74"
resourceType = "group"
}
)
excluded = @(
)
}
}
}

New-MgBetaPolicyCrossTenantAccessPolicyDefaultM365Capability -BodyParameter $params

```
This example will create a cross-tenant migration capability

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### Example 1: Create a cross-tenant mail tips capability

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.crossTenantMailTipsLimited"
inboundAccess = @{
isAllowed = $false
resourceScopes = @{
included = @(
@{
resourceId = "ad4fc698-74dc-4f62-9e71-ba9b591e8e74"
resourceType = "group"
}
)
excluded = @(
)
}
}
}

New-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability -CrossTenantAccessPolicyConfigurationPartnerTenantId $crossTenantAccessPolicyConfigurationPartnerTenantId -BodyParameter $params

```
This example will create a cross-tenant mail tips capability

### Example 2: Create a cross-tenant places room booking capability

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.crossTenantPlacesRoomBooking"
inboundAccess = @{
isAllowed = $true
resourceScopes = @{
included = @(
@{
resourceId = "ad4fc698-74dc-4f62-9e71-ba9b591e8e74"
resourceType = "group"
}
)
excluded = @(
)
}
}
}

New-MgBetaPolicyCrossTenantAccessPolicyPartnerM365Capability -CrossTenantAccessPolicyConfigurationPartnerTenantId $crossTenantAccessPolicyConfigurationPartnerTenantId -BodyParameter $params

```
This example will create a cross-tenant places room booking capability

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### Example 1: Update an onTokenIssuanceStartCustomExtension object

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.onTokenIssuanceStartCustomExtension"
displayName = "onTokenIssuanceStartCustomExtension"
description = "Fetch additional claims from custom user store"
endpointConfiguration = @{
"@odata.type" = "#microsoft.graph.httpRequestEndpoint"
targetUrl = "https://authenticationeventsAPI.contoso.com"
}
authenticationConfiguration = @{
"@odata.type" = "#microsoft.graph.azureAdTokenAuthentication"
resourceId = "api://authenticationeventsAPI.contoso.com/a13d0fc1-04ab-4ede-b215-63de0174cbb4"
}
claimsForTokenConfiguration = @(
@{
claimIdInApiResponse = "DateOfBirth"
}
@{
claimIdInApiResponse = "CustomRoles"
}
)
}

Update-MgBetaIdentityCustomAuthenticationExtension -CustomAuthenticationExtensionId $customAuthenticationExtensionId -BodyParameter $params

```
This example will update an ontokenissuancestartcustomextension object

### Example 2: Update an onVerifiedIdClaimValidationCustomExtension object

```powershell

Import-Module Microsoft.Graph.Beta.Identity.SignIns

$params = @{
"@odata.type" = "#microsoft.graph.onVerifiedIdClaimValidationCustomExtension"
displayName = "Verified ID Claim Validation (updated)"
description = "Updated description for Verified ID claim validation"
}

Update-MgBetaIdentityCustomAuthenticationExtension -CustomAuthenticationExtensionId $customAuthenticationExtensionId -BodyParameter $params

```
This example will update an onverifiedidclaimvalidationcustomextension object

Loading
Loading