You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft Graph PowerShell supports two types of authentication: delegated and app-only access. 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.
12
-
10
+
## SYNOPSIS
11
+
Microsoft Graph PowerShell supports two types of authentication: delegated and app-only access. 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.
You must invoke Connect-MgGraph before any commands that access Microsoft Graph. This cmdlet gets the access token using the Microsoft Authentication Library
55
-
56
-
## EXAMPLES
57
-
52
+
## DESCRIPTION
53
+
You must invoke Connect-MgGraph before any commands that access Microsoft Graph. This cmdlet gets the access token using the Microsoft Authentication Library
54
+
## EXAMPLES
58
55
### Example 1: Delegated access: Using interactive authentication, where you provide the scopes that you require during your session
Follow this [link](https://learn.microsoft.com/en-us/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0#using-connect-mggraph) for more information on the steps for creating custom applications.
85
78
86
79
### Example 5: App-only access: Using client credential with a certificate - Certificate Thumbprint
Follow this [link](https://learn.microsoft.com/en-us/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0#using-connect-mggraph) for more information on how to load the certificate.
92
84
93
85
### Example 6: App-only access: Using client credential with a certificate - Certificate name
Follow this [link](https://learn.microsoft.com/en-us/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0#using-connect-mggraph) for more information on how to load the certificate.
99
90
100
91
### Example 7: App-only access: Using client credential with a certificate - Certificate
Follow this [link](https://learn.microsoft.com/en-us/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0#using-connect-mggraph) for more information on how to load the certificate.
Once you're signed in, you'll remain signed in until you invoke Disconnect-MgGraph. 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.
12
-
10
+
## SYNOPSIS
11
+
Once you're signed in, you'll remain signed in until you invoke Disconnect-MgGraph. 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.
13
12
## SYNTAX
14
13
15
14
```
16
15
Disconnect-MgGraph [<CommonParameters>]
17
16
```
18
17
19
-
## DESCRIPTION
20
-
Use Disconnect-MgGraph to sign out.
21
-
22
-
## EXAMPLES
18
+
## DESCRIPTION
19
+
Use Disconnect-MgGraph to sign out.
20
+
## EXAMPLES
23
21
24
22
### Example 1: Using Disconnect-MgGraph
25
23
```powershell
26
24
PS C:\> Disconnect-MgGraph
27
25
```
28
-
29
26
Use Disconnect-MgGraph to sign out.
30
-
27
+
31
28
## PARAMETERS
32
29
33
30
### CommonParameters
@@ -43,5 +40,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
Copy file name to clipboardExpand all lines: src/Authentication/docs/Find-MgGraphCommand.md
+8-16Lines changed: 8 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,8 @@ schema: 2.0.0
7
7
8
8
# Find-MgGraphCommand
9
9
10
-
## 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. The Find-MgGraphCommand allows to: - Pass a Microsoft Graph URL (relative and absolute) and get an equivalent Microsoft Graph PowerShell command. - Pass a command and get the URL it calls. - Pass a command or URI wildcard (.*) to find all commands that match it.
12
-
10
+
## 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. The Find-MgGraphCommand allows to: - Pass a Microsoft Graph URL (relative and absolute) and get an equivalent Microsoft Graph PowerShell command. - Pass a command and get the URL it calls. - Pass a command or URI wildcard (.*) to find all commands that match it.
Get-MgUser Users GET /users IMicrosoftGraphUser {DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All...} {List}
80
77
```
81
-
82
78
This example looks up a command with the provided command name that calls both beta and v1.0 version of the API.
83
79
84
80
### Example 3: Pass a command and get the permissions required
@@ -94,7 +90,6 @@ User.Read.All True Read all users' full profil
94
90
User.ReadBasic.All False Read all users' basic profiles Allows the app to read a basic set of profile properties of other users in your organization on your behalf. Includes display name, first and last name, email address a...
95
91
User.ReadWrite.All True Read and write all users' full profiles Allows the app to read and write the full set of profile properties, reports, and managers of other users in your organization, on your behalf.
96
92
```
97
-
98
93
This example retrieves the scopes required for a particular command.
99
94
100
95
### Example 4: Find Microsoft Graph PowerShell commands using a command wildcard
@@ -112,7 +107,6 @@ Get-MgUserTodoListExtension Users GET /users/{us
112
107
Get-MgUserTodoListTask Users GET /users/{user-id}/todo/lists/{todoTaskList-id}/tasks
113
108
Get-MgUserTodoListTask Users GET /users/{user-id}/todo/lists/{todoTaskList-id}/tasks/{todoTask-id}
114
109
```
115
-
116
110
Uses a wildcard syntax to search for commands.
117
111
118
112
### Example 5: Find Microsoft Graph PowerShell commands using a URI wildcard
@@ -126,9 +120,8 @@ Get-MgUserActivity CrossDeviceExperiences GET /users
126
120
Get-MgUserActivity CrossDeviceExperiences GET /users/{user-id}/activities
127
121
Get-MgUserActivityHistoryItem CrossDeviceExperiences GET /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}
128
122
```
129
-
130
123
Searches for commands using URI wildcard.
131
-
124
+
132
125
## PARAMETERS
133
126
134
127
### -ApiVersion
@@ -241,5 +234,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
0 commit comments