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
Copy file name to clipboardExpand all lines: README.md
+61-68Lines changed: 61 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,109 +1,88 @@
1
-
# Microsoft Graph PowerShell SDK
1
+
# Microsoft Graph PowerShell Module
2
2
3
-
The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain commands for calling Microsoft Graph service.
3
+
Consume [Microsoft Graph](https://developer.microsoft.com/graph) resources directly from your PowerShell scripts!
4
+
5
+
The Microsoft Graph PowerShell Module consists of a collection of PowerShell modules that contain commands for calling Microsoft Graph API. The module acts as an API wrapper for the Microsoft Graph APIs, exposing the entire API set for use in PowerShell.
4
6
5
7
## Modules
6
8
7
-
The table below contains our Microsoft Graph rollup module. This module installs all the service modules as its dependencies.
9
+
The table below contains a link to our latest Microsoft Graph meta module. This module installs all the service modules as their dependencies.
8
10
Description | Module Name | PowerShell Gallery Link
Microsoft Graph | `Microsoft.Graph` | [![Mg]][MgGallery]
11
13
12
-
For a list of modules found in this repository, see the [Microsoft Graph PowerShell modules](https://github.com/microsoftgraph/msgraph-sdk-powershell/wiki/MS-Graph-PowerShell-Modules)document.
14
+
See [Microsoft Graph PowerShell modules](https://github.com/microsoftgraph/msgraph-sdk-powershell/wiki/MS-Graph-PowerShell-Modules)for a list of all modules found in this repository, .
13
15
14
16
## Installation
15
17
16
18
### PowerShell Gallery
17
19
18
-
All the modules are published on [PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.Graph). Installing is as simple as:
20
+
Microsoft Graph PowerShell module is published on [PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.Graph). Installing is as simple as:
19
21
20
22
```powershell
21
23
Install-Module Microsoft.Graph
22
24
```
23
25
24
-
If you are upgrading from our preview modules, run `Install-Module` with AllowClobber and Force parameters to avoid command name conflicts:
There is a set of samples in the `samples` folder to help in getting started with the library. If you have an older version of these modules installed, there are extra uninstall instructions in the [InstallModule](./samples/0-InstallModule.ps1) script.
26
+
> If you are upgrading from our preview modules, run `Install-Module` with AllowClobber and Force parameters to avoid command name conflicts:
See [Install the Microsoft Graph PowerShell Module](https://learn.microsoft.com/powershell/microsoftgraph/installation) for detailed installation instructions.
32
33
## Usage
33
34
34
-
1. Authentication
35
-
36
-
The SDK supports two types of authentication: delegated access and app-only access.
Get access to Microsoft Graph resources on behalf of a user.
52
42
53
-
``` powershell
54
-
# Using your own access token.
55
-
Connect-MgGraph -AccessToken $AccessToken
56
-
```
57
-
58
-
- App-only access via Client Credential with a certificate.
59
-
60
-
The certificate will be loaded from `Cert:\CurrentUser\My\` store when `-CertificateThumbprint` or `-CertificateName` is specified. Ensure the certificate is present in the store before calling `Connect-MgGraph`.
> The certificate will be loaded from `Cert:\CurrentUser\My\` store when `-CertificateThumbprint` or `-CertificateName` is specified. Ensure the certificate is present in the store before calling `Connect-MgGraph`.
See [Authentication module cmdlets in Microsoft Graph PowerShell](https://learn.microsoft.com/powershell/microsoftgraph/authentication-commands) for more information.
5. Sign out of the current logged-in context i.e. app only or delegated access.
81
+
### 5. Sign out of the current logged-in context i.e. app only or delegated access
103
82
104
-
``` powershell
105
-
Disconnect-MgGraph
106
-
```
83
+
```powershell
84
+
Disconnect-MgGraph
85
+
```
107
86
108
87
## API Version
109
88
@@ -113,6 +92,20 @@ By default, the SDK uses the Microsoft Graph REST API v1.0. You can change this
113
92
Select-MgProfile -Name "beta"
114
93
```
115
94
95
+
## Notes
96
+
97
+
### Upgrading to v2
98
+
99
+
The following breaking changes have been introduced between `v1.x` and `v2.x`:
100
+
101
+
- Dropped profile support.
102
+
- Dropped support for `-ForceRefresh` on `Connect-MgGraph`.
103
+
- Renamed `beta` command names from `<Verb>-Mg<Noun>` to `<Verb>-MgBeta<Noun>`.
104
+
- Changed beta namespace from `Microsoft.Graph.PowerShell.Models.<Entity>` to `Microsoft.Graph.Beta.PowerShell.Models.<Entity>`.
105
+
- Changed `-AccessToken` type on `Connect-MgGraph` from `String` to `SecureString`.
106
+
107
+
See [v2 upgrade guide](https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/features/2.0/docs/upgrade-to-v2.md) for more details.
108
+
116
109
## Troubleshooting Permission Related Errors
117
110
118
111
When working with various operations in the Graph, you may encounter an error such as "Insufficient privileges to complete the operation." For example, this particular error can occur when using the `New-MgApplication` command if the appropriate permissions are not granted.
0 commit comments