|
1 | | -# Microsoft Graph PowerShell SDK (alpha) |
2 | | -The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph. |
| 1 | +# Microsoft Graph PowerShell SDK Preview |
| 2 | +The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph. |
3 | 3 |
|
4 | | -## Installing the Microsoft.Graph.Beta Module |
| 4 | +## Installing the Microsoft.Graph Module |
5 | 5 |
|
6 | | -In the future, the modules will be published to the PowerShell Gallery, however in the short term they are hosted on our own nuget feed. Use the following commands to register repository and then install the `Microsoft.Graph.Beta` module from there. |
| 6 | +The modules are now published on the PowerShell Gallery. Installing is as simple as: |
7 | 7 |
|
8 | 8 | ```ps |
9 | | -Register-PSRepository ` |
10 | | --Name GraphPowerShell ` |
11 | | --SourceLocation https://graphpowershellrepository.azurewebsites.net/nuget |
12 | | -
|
13 | | -# Installing the Graph PowerShell module for the Beta API |
14 | | -Install-module Microsoft.Graph.Beta -Repository GraphPowerShell |
| 9 | +Install-module Microsoft.Graph |
15 | 10 | ``` |
16 | 11 |
|
17 | | -There are a set of samples in the `samples` folder to help getting started with the library. |
| 12 | +There are a set of samples in the `samples` folder to help getting started with the library. If you have an older version of these modules installed, there are uninstall instructions in the [InstallModule](./samples/0-InstallModule.ps1) script. |
18 | 13 |
|
19 | 14 | ## Generate Module |
20 | 15 |
|
@@ -134,3 +129,12 @@ There are a set of samples in the `samples` folder to help getting started with |
134 | 129 | ```ps |
135 | 130 | Disconnect-Graph |
136 | 131 | ``` |
| 132 | +
|
| 133 | +## Troubleshooting Permission Related Errors |
| 134 | +
|
| 135 | +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-Application` command if the appropriate permissions are not granted. |
| 136 | +
|
| 137 | +If permission related errors occur and the user you authenticated with in the popup has the appropriate permissions to peform the operation try these steps. |
| 138 | +
|
| 139 | +- You can try running `Disconnect-Graph`, then `Connect-Graph`. Then, run the code that encountered the permission issues to see if it works. |
| 140 | +- You can try running `Connect-Graph -ForceRefresh`. This will trigger a refresh of the access token in your cache. MSAL will only refresh the access token in your cache if it has expired (usually an hour), or if you explicitly refresh it via `-ForceRefresh`. Then, run the code that encountered the permission issues to see if it works. |
0 commit comments