Skip to content

Commit ce406d7

Browse files
authored
Merge pull request #700 from MicrosoftDocs/main
Merge main into Saisang-patch-1
2 parents 7709b44 + 2cc1bf4 commit ce406d7

File tree

31 files changed

+8498
-2951
lines changed

31 files changed

+8498
-2951
lines changed

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Microsoft.Graph.Applications.md

Lines changed: 320 additions & 119 deletions
Large diffs are not rendered by default.

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Connect-MgGraph.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ schema: 2.0.0
88
# Connect-MgGraph
99

1010
## SYNOPSIS
11-
Microsoft Graph PowerShell supports two types of authentication: delegated and app-only access.
12-
There are a number of cmdlets that can be used to manage the different parameters required during authentication, for example, environment, application ID, and certificate.
11+
You must invoke Connect-MgGraph before any commands that access Microsoft Graph.
1312

1413
## SYNTAX
1514

@@ -54,8 +53,12 @@ Connect-MgGraph [-ContextScope <ContextScope>] [-Environment <String>] [-ClientT
5453
```
5554

5655
## DESCRIPTION
57-
You must invoke Connect-MgGraph before any commands that access Microsoft Graph.
58-
This cmdlet gets the access token using the Microsoft Authentication Library
56+
57+
Microsoft Graph PowerShell supports two types of authentication: delegated and app-only access.
58+
There are a number of cmdlets that can be used to manage the different parameters required during
59+
authentication, for example, environment, application ID, and certificate.
60+
61+
This cmdlet gets the access token using the Microsoft Authentication Library.
5962

6063
## EXAMPLES
6164

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Disconnect-MgGraph.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ schema: 2.0.0
88
# Disconnect-MgGraph
99

1010
## SYNOPSIS
11-
Once you're signed in, you'll remain signed in until you invoke Disconnect-MgGraph.
12-
Microsoft Graph PowerShell automatically refreshes the access token for you and sign-in persists across PowerShell sessions because Microsoft Graph PowerShell securely caches the token.
11+
Use Disconnect-MgGraph to sign out.
1312

1413
## SYNTAX
1514

@@ -18,7 +17,10 @@ Disconnect-MgGraph [-ProgressAction <ActionPreference>] [<CommonParameters>]
1817
```
1918

2019
## DESCRIPTION
21-
Use Disconnect-MgGraph to sign out.
20+
21+
Once you're signed in, you'll remain signed in until you invoke Disconnect-MgGraph. Microsoft Graph
22+
PowerShell automatically refreshes the access token for you and sign-in persists across PowerShell
23+
sessions because Microsoft Graph PowerShell securely caches the token.
2224

2325
## EXAMPLES
2426

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Find-MgGraphCommand.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,47 @@ schema: 2.0.0
88
# Find-MgGraphCommand
99

1010
## SYNOPSIS
11-
Find-MgGraphCommand aims to make it easier for you to discover which API path a command calls, by providing a URI or a command name.
12-
The Find-MgGraphCommand allows to: - Pass a Microsoft Graph URL (relative and absolute) and get an equivalent Microsoft Graph PowerShell command.
13-
- Pass a command and get the URL it calls.
14-
- Pass a command or URI wildcard (.*) to find all commands that match it.
11+
Find-MgGraphCommand aims to make it easier for you to discover which API path a command calls, by
12+
providing a URI or a command name.
1513

1614
## SYNTAX
1715

1816
### FindByCommandOrUri (Default)
17+
1918
```
2019
Find-MgGraphCommand [-ApiVersion <String>] [-InputObject] <Object[]> [-ProgressAction <ActionPreference>]
2120
[<CommonParameters>]
2221
```
2322

2423
### FindByUri
24+
2525
```
2626
Find-MgGraphCommand [-Uri] <String[]> [-Method <String>] [-ApiVersion <String>]
2727
[-ProgressAction <ActionPreference>] [<CommonParameters>]
2828
```
2929

3030
### FindByCommand
31+
3132
```
3233
Find-MgGraphCommand [-ApiVersion <String>] -Command <String[]> [-ProgressAction <ActionPreference>]
3334
[<CommonParameters>]
3435
```
3536

3637
## DESCRIPTION
37-
Find-MgGraphCommand aims to make it easier for you to discover which API path a command calls, by providing a URI or a command name.
38+
39+
Find-MgGraphCommand aims to make it easier for you to discover which API path a command calls, by
40+
providing a URI or a command name. The Find-MgGraphCommand allows to:
41+
42+
- Pass a Microsoft Graph URL (relative and absolute) and get an equivalent Microsoft Graph
43+
PowerShell command.
44+
- Pass a command and get the URL it calls.
45+
- Pass a command or URI wildcard (.*) to find all commands that match it.
3846

3947
## EXAMPLES
4048

4149
### Example 1: Use a URI to get all related cmdlets
42-
```
50+
51+
```powershell
4352
PS C:\> Find-MgGraphCommand -Uri "/users/{id}"
4453
4554
APIVersion: v1.0
@@ -63,7 +72,8 @@ Update-MgUser Users PATCH /users/{user-id} {DeviceManageme
6372
This example finds all commands that call the provided Microsoft Graph URI.
6473

6574
### Example 2: Pass a command and get the URI it calls
66-
```
75+
76+
```powershell
6777
PS C:\> Find-MgGraphCommand -Command 'Get-MgUser'
6878
6979
APIVersion: v1.0
@@ -85,7 +95,8 @@ Get-MgUser Users GET /users IMicrosoftGraphUser {DeviceManagementA
8595
This example looks up a command with the provided command name that calls both beta and v1.0 version of the API.
8696

8797
### Example 3: Pass a command and get the permissions required
88-
```
98+
99+
```powershell
89100
PS C:\> Find-MgGraphCommand -command Get-MgUser | Select -First 1 -ExpandProperty Permissions
90101
91102
Name IsAdmin Description FullDescription
@@ -101,7 +112,8 @@ User.ReadWrite.All True Read and write all users' f
101112
This example retrieves the scopes required for a particular command.
102113

103114
### Example 4: Find Microsoft Graph PowerShell commands using a command wildcard
104-
```
115+
116+
```powershell
105117
PS C:\> Find-MgGraphCommand -Command .*UserToDo.* -APIVersion 'v1.0'
106118
APIVersion: v1.0
107119
@@ -119,7 +131,8 @@ Get-MgUserTodoListTask Users GET /users/{us
119131
Uses a wildcard syntax to search for commands.
120132

121133
### Example 5: Find Microsoft Graph PowerShell commands using a URI wildcard
122-
```
134+
135+
```powershell
123136
PS C:\> Find-MgGraphCommand -Uri ".*users.*" -Method 'Get' -ApiVersion 'v1.0'
124137
Command Module Method URI
125138
------- ------ ------ ---
@@ -135,6 +148,7 @@ Searches for commands using URI wildcard.
135148
## PARAMETERS
136149

137150
### -ApiVersion
151+
138152
The service API version.
139153

140154
```yaml
@@ -150,8 +164,8 @@ Accept wildcard characters: False
150164
```
151165
152166
### -Command
153-
The name of a command.
154-
e.g., Get-MgUser.}
167+
168+
The name of a command. For example, `Get-MgUser`.
155169

156170
```yaml
157171
Type: String[]
@@ -166,6 +180,7 @@ Accept wildcard characters: False
166180
```
167181

168182
### -InputObject
183+
169184
Pipeline input object
170185

171186
```yaml
@@ -181,6 +196,7 @@ Accept wildcard characters: False
181196
```
182197

183198
### -Method
199+
184200
The HTTP method a command makes.
185201

186202
```yaml
@@ -196,6 +212,7 @@ Accept wildcard characters: False
196212
```
197213

198214
### -ProgressAction
215+
199216
Treat this as a common parameter.
200217

201218
```yaml
@@ -211,8 +228,8 @@ Accept wildcard characters: False
211228
```
212229

213230
### -Uri
214-
The API path a command calls.
215-
e.g., /users.
231+
232+
The API path a command calls. For example, `/users`.
216233

217234
```yaml
218235
Type: String[]
@@ -227,21 +244,33 @@ Accept wildcard characters: False
227244
```
228245

229246
### CommonParameters
230-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
247+
248+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
249+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
250+
-WarningAction, and -WarningVariable. For more information, see
251+
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
231252

232253
## INPUTS
233254

234-
### Pipeline input accepts API URIs as an array of strings.
255+
### System.String[]
256+
257+
Pipeline input accepts API URIs as an array of strings.
258+
235259
## OUTPUTS
236260

237-
### Microsoft.Graph.PowerShell.Authentication.Models.IGraphCommand with the following properties:
238-
### 1. Command: Name of command.
239-
### 2. Module: Module in which a command is defined.
240-
### 3. Method: The HTTP method a command makes.
241-
### 4. Uri: The Microsoft Graph API URI a command calls.
242-
### 5. OutputType: The return type of a command.
243-
### 6. Permissions: Permissions needed to use a command. This field can be empty if the permissions are not yet available in Graph Explorer.
244-
### 7. Variants: The parameter sets of a command.
261+
### Microsoft.Graph.PowerShell.Authentication.Models.IGraphCommand
262+
263+
The **IGraphCommand** class has the following properties:
264+
265+
- **Command**: Name of command.
266+
- **Module**: Module in which a command is defined.
267+
- **Method**: The HTTP method a command makes.
268+
- **Uri**: The Microsoft Graph API URI a command calls.
269+
- **OutputType**: The return type of a command.
270+
- **Permissions**: Permissions needed to use a command. This field can be empty if the permissions
271+
are not yet available in Graph Explorer.
272+
- **Variants**: The parameter sets of a command.
273+
245274
## NOTES
246275

247276
## RELATED LINKS

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Find-MgGraphPermission.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ schema: 2.0.0
88
# Find-MgGraphPermission
99

1010
## SYNOPSIS
11-
The Microsoft Graph PowerShell SDK application requires users to have ___domain knowledge of both the semantics and syntax of Microsoft Graph API permissions used to authorize access to the API.
12-
This cmdlet helps to answer the following questions: - How do I find the values to supply to the permission-related parameters of commands like New-MgApplication and other application and consent related commands?
13-
- What permissions are applicable to a certain ___domain, for example, application, directory?
14-
To use Microsoft Graph PowerShell SDK to access Microsoft Graph, users must sign in to an Azure AD application using the Connect-MgGraph command.
15-
Use the Find-MgGraphCommand to find which permissions to use for a specific cmdlet or API.- Currently PowerShell commands and scripts, including those implemented with Microsoft Graph PowerShell SDK itself, have no way of validating user input that refers to permissions or providing "auto-complete" user experiences to help users accurately supply input to commands
11+
Retrieves permissions that are applicable to a certain ___domain.
1612

1713
## SYNTAX
1814

@@ -29,8 +25,20 @@ Find-MgGraphPermission [-PermissionType <String>] [-Online] [-All] [-ProgressAct
2925
```
3026

3127
## DESCRIPTION
32-
Retrieves permissions that are applicable to a certain ___domain.
33-
For example application, directory.
28+
29+
The Microsoft Graph PowerShell SDK application requires users to have ___domain knowledge of both the
30+
semantics and syntax of Microsoft Graph API permissions used to authorize access to the API. This
31+
cmdlet helps to answer the following questions:
32+
33+
- How do I find the values to supply to the permission-related parameters of commands like
34+
New-MgApplication and other application and consent related commands?
35+
- What permissions are applicable to a certain ___domain, for example, application, directory? To use
36+
Microsoft Graph PowerShell SDK to access Microsoft Graph, users must sign in to an Azure AD
37+
application using the Connect-MgGraph command. Use the Find-MgGraphCommand to find which
38+
permissions to use for a specific cmdlet or API.
39+
- Currently PowerShell commands and scripts, including those implemented with Microsoft Graph
40+
PowerShell SDK itself, have no way of validating user input that refers to permissions or
41+
providing "auto-complete" user experiences to help users accurately supply input to commands
3442

3543
## EXAMPLES
3644

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Get-MgContext.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Get-MgContext
99

1010
## SYNOPSIS
11-
Get-MgContext is used to retrieve the details about your current session, which include: - ClientID - TenantID - Certificate Thumbprint - Scopes consented to - AuthType: Delegated or app-only - AuthProviderType - CertificateName - Account - AppName - ContextScope - Certificate - PSHostVersion - ClientTimeOut.
11+
Retrieves session details.
1212

1313
## SYNTAX
1414

@@ -17,7 +17,22 @@ Get-MgContext [-ProgressAction <ActionPreference>] [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
20-
Retrieves session details.
20+
21+
Get-MgContext is used to retrieve the details about your current session, which include:
22+
23+
- ClientID
24+
- TenantID
25+
- Certificate Thumbprint
26+
- Scopes consented to
27+
- AuthType: Delegated or app-only
28+
- AuthProviderType
29+
- CertificateName
30+
- Account
31+
- AppName
32+
- ContextScope
33+
- Certificate
34+
- PSHostVersion
35+
- ClientTimeout
2136

2237
## EXAMPLES
2338

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Get-MgGraphOption.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ schema: 2.0.0
99

1010
## SYNOPSIS
1111
Gets global configurations that apply to the SDK.
12-
For example, check if Web Account Manager (WAM) support has been enabled.
1312

1413
## SYNTAX
1514

@@ -26,7 +25,7 @@ For example, check if Web Account Manager (WAM) support has been enabled.
2625
### Example 1: Check if WAM support has been enabled
2726
```
2827
PS C:\> Get-MgGraphOption
29-
EnableWAMForMSGraph
28+
EnableWAMForMSGraph
3029
--------------------
3130
True
3231
```

microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Authentication/Invoke-MgGraphRequest.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ schema: 2.0.0
88
# Invoke-MgGraphRequest
99

1010
## SYNOPSIS
11-
Invoke-MgGraphRequest issues REST API requests to the Graph API.
12-
It works for any Graph API if you know the REST URI, method, and optional body parameter.
13-
This command is especially useful for accessing APIs for which there isn't an equivalent cmdlet yet.
11+
This command issues REST API requests.
1412

1513
## SYNTAX
1614

@@ -24,7 +22,9 @@ Invoke-MgGraphRequest [[-Method] <GraphRequestMethod>] [-Uri] <Uri> [[-Body] <Ob
2422
```
2523

2624
## DESCRIPTION
27-
This command issues REST API requests.
25+
Invoke-MgGraphRequest issues REST API requests to the Graph API. It works for any Graph API if you
26+
know the REST URI, method, and optional body parameter. This command is especially useful for
27+
accessing APIs for which there isn't an equivalent cmdlet yet.
2828

2929
## EXAMPLES
3030

0 commit comments

Comments
 (0)