Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .azure-pipelines/common-templates/install-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
steps:
- task: PowerShell@2
displayName: Install PowerShell SDK
inputs:
targetType: 'inline'
pwsh: true
script: |
try{
# Installing Beta module.
Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber
}catch{
echo "Error when installing Beta"
}
try{
# Installing V1 module.
Install-Module Microsoft.Graph -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber
}catch{
echo "Error when installing V1"
}
2 changes: 1 addition & 1 deletion .azure-pipelines/weekly-examples-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
name: ${{ parameters.BuildAgent }}
timeoutInMinutes: ${{ parameters.PipelineTimeout }}
steps:

- template: ./common-templates/install-sdk.yml
- task: PowerShell@2
name: "ComputeBranch"
displayName: "Compute weekly examples update branch name"
Expand Down
48 changes: 29 additions & 19 deletions src/Applications/beta/examples/Add-MgBetaApplicationKey.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
### Example 1: Using the Add-MgBetaApplicationKey Cmdlet
### Example 1: Add a new key credential to an application

```powershell
Import-Module Microsoft.Graph.Beta.Applications
$params = @{
KeyCredential = @{
Type = "AsymmetricX509Cert"
Usage = "Verify"
Key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
keyCredential = @{
type = "AsymmetricX509Cert"
usage = "Verify"
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
}
PasswordCredential = $null
Proof = "eyJ0eXAiOiJ..."
passwordCredential = $null
proof = "eyJ0eXAiOiJ..."
}
Add-MgBetaApplicationKey -ApplicationId $applicationId -BodyParameter $params
```
This example shows how to use the Add-MgBetaApplicationKey Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
### Example 2: Using the Add-MgBetaApplicationKey Cmdlet
This example will add a new key credential to an application

### Example 2: Add a key credential and an associated password for the key

```powershell
Import-Module Microsoft.Graph.Beta.Applications
$params = @{
KeyCredential = @{
Type = "X509CertAndPassword"
Usage = "Sign"
Key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
keyCredential = @{
type = "X509CertAndPassword"
usage = "Sign"
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
}
PasswordCredential = @{
SecretText = "MKTr0w1..."
passwordCredential = @{
secretText = "MKTr0w1..."
}
Proof = "eyJ0eXAiOiJ..."
proof = "eyJ0eXAiOiJ..."
}
Add-MgBetaApplicationKey -ApplicationId $applicationId -BodyParameter $params
```
This example shows how to use the Add-MgBetaApplicationKey Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
This example will add a key credential and an associated password for the key

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Example 1: Using the Clear-MgBetaApplicationVerifiedPublisher Cmdlet
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Clear-MgBetaApplicationVerifiedPublisher -ApplicationId $applicationId
```
This example shows how to use the Clear-MgBetaApplicationVerifiedPublisher Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,40 +0,0 @@
### Example 1: Check group memberships for a directory object

```powershell
Import-Module Microsoft.Graph.Beta.DirectoryObjects
$params = @{
GroupIds = @(
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
"93670da6-d731-4366-94b5-abed40b6016b"
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
)
}
Confirm-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
```
This example shows how to use the Confirm-MgBetaApplicationMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

### Example 2: Check group memberships for the signed-in user

```powershell
Import-Module Microsoft.Graph.Beta.Users.Actions
$params = @{
GroupIds = @(
"fee2c45b-915a-4a64b130f4eb9e75525e"
"4fe90ae065a-478b9400e0a0e1cbd540"
)
}
# A UPN can also be used as -UserId.
Confirm-MgBetaUserMemberGroup -UserId $userId -BodyParameter $params
```
This example shows how to use the Confirm-MgBetaApplicationMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,40 +0,0 @@
### Example 1: Check group memberships for a directory object

```powershell
Import-Module Microsoft.Graph.Beta.DirectoryObjects
$params = @{
GroupIds = @(
"f448435d-3ca7-4073-8152-a1fd73c0fd09"
"bd7c6263-4dd5-4ae8-8c96-556e1c0bece6"
"93670da6-d731-4366-94b5-abed40b6016b"
"f5484ab1-4d4d-41ec-a9b8-754b3957bfc7"
"c9103f26-f3cf-4004-a611-2a14e81b8f79"
)
}
Confirm-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
```
This example shows how to use the Confirm-MgBetaServicePrincipalMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

### Example 2: Check group memberships for the signed-in user

```powershell
Import-Module Microsoft.Graph.Beta.Users.Actions
$params = @{
GroupIds = @(
"fee2c45b-915a-4a64b130f4eb9e75525e"
"4fe90ae065a-478b9400e0a0e1cbd540"
)
}
# A UPN can also be used as -UserId.
Confirm-MgBetaUserMemberGroup -UserId $userId -BodyParameter $params
```
This example shows how to use the Confirm-MgBetaServicePrincipalMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Example 1: Using the Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory Cmdlet
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory -ServicePrincipalId $servicePrincipalId -SynchronizationJobId $synchronizationJobId -DirectoryDefinitionId $directoryDefinitionId
```
This example shows how to use the Find-MgBetaServicePrincipalSynchronizationJobSchemaDirectory Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
### Example 1: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

### Example 2: {{ Add title here }}
```powershell
PS C:\> {{ Add code here }}
{{ Add output here }}
```

{{ Add description here }}

25 changes: 0 additions & 25 deletions src/Applications/beta/examples/Get-MgBetaApplicationById.md
Original file line number Diff line number Diff line change
@@ -1,25 +0,0 @@
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.DirectoryObjects
$params = @{
Ids = @(
"84b80893-8749-40a3-97b7-68513b600544"
"5d6059b6-368d-45f8-91e1-8e07d485f1d0"
"0b944de3-e0fc-4774-a49a-b135213725ef"
"b75a5ab2-fe55-4463-bd31-d21ad555c6e0"
)
Types = @(
"user"
"group"
"device"
)
}
Get-MgBetaDirectoryObjectById -BodyParameter $params
```
This example shows how to use the Get-MgBetaApplicationById Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

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

```powershellImport-Module Microsoft.Graph.Beta.Applications
```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaApplicationExtensionProperty -ApplicationId $applicationId
```
This example shows how to use the Get-MgBetaApplicationExtensionProperty Cmdlet.

Get-MgBetaApplicationExtensionProperty -ApplicationId $applicationId -ExtensionPropertyId $extensionPropertyId
```
This example shows how to use the Get-MgBetaApplicationExtensionProperty Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
### Example 1: Code snippet
### Example 1: Code snippet

```powershellImport-Module Microsoft.Graph.Beta.Applications
```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaApplicationFederatedIdentityCredential -ApplicationId $applicationId
```
This example shows how to use the Get-MgBetaApplicationFederatedIdentityCredential Cmdlet.

Get-MgBetaApplicationFederatedIdentityCredential -ApplicationId $applicationId -FederatedIdentityCredentialId $federatedIdentityCredentialId
```
This example shows how to use the Get-MgBetaApplicationFederatedIdentityCredential Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).
Original file line number Diff line number Diff line change
@@ -1,31 +0,0 @@
### Example 1: Check group memberships for a directory object

```powershell
Import-Module Microsoft.Graph.Beta.DirectoryObjects
$params = @{
SecurityEnabledOnly = $false
}
Get-MgBetaDirectoryObjectMemberGroup -DirectoryObjectId $directoryObjectId -BodyParameter $params
```
This example shows how to use the Get-MgBetaApplicationMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

### Example 2: Check group memberships for the signed-in user

```powershell
Import-Module Microsoft.Graph.Beta.Users.Actions
$params = @{
SecurityEnabledOnly = $true
}
# A UPN can also be used as -UserId.
Get-MgBetaUserMemberGroup -UserId $userId -BodyParameter $params
```
This example shows how to use the Get-MgBetaApplicationMemberGroup Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

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

```powershell
Import-Module Microsoft.Graph.Beta.DirectoryObjects
$params = @{
SecurityEnabledOnly = $true
}
Get-MgBetaDirectoryObjectMemberObject -DirectoryObjectId $directoryObjectId -BodyParameter $params
```
This example shows how to use the Get-MgBetaApplicationMemberObject Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
### Example 1: Using the Get-MgBetaApplicationOwner Cmdlet
### Example 1: Code snippet

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaApplicationOwner -ApplicationId $applicationId
```
This example shows how to use the Get-MgBetaApplicationOwner Cmdlet.
To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

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

```powershell
Import-Module Microsoft.Graph.Beta.Applications
Get-MgBetaApplicationOwner -ApplicationId $applicationId
```
This example shows how to use the Get-MgBetaApplicationOwnerByRef Cmdlet.

To learn about permissions for this resource, see the [permissions reference](/graph/permissions-reference).

Loading