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: microsoftgraph/docs-conceptual/troubleshooting.md
+3-29Lines changed: 3 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Error handling and troubleshooting cmdlets"
3
3
description: "Learn how to diagnose common errors in Microsoft Graph PowerShell"
4
4
5
5
ms.topic: troubleshooting
6
-
ms.date: 08/11/2022
6
+
ms.date: 05/22/2023
7
7
ms.author: eunicewaweru
8
8
manager: CelesteDG
9
9
author: msewaweru
@@ -20,45 +20,19 @@ Before troubleshooting any errors, make sure that you're running the most recent
20
20
Get-InstalledModule
21
21
```
22
22
23
-
The version of the `Microsoft.Graph` module should be the most recent compared to the latest release in the [PowerShell gallery](https://www.powershellgallery.com/packages/Microsoft.Graph). If your installed module isn't up to date, update it by running:
23
+
The version of the `Microsoft.Graph` module should be the most recent compared to the latest release in the [PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.Graph). If your installed module isn't up to date, update it by running:
24
24
25
25
```PowerShell
26
26
Update-Module Microsoft.Graph
27
27
```
28
28
29
-
## Profile related errors
30
-
31
-
By default, Microsoft Graph PowerShell commands target the v1.0 API version. Commands for APIs that are only available in beta aren't available in PowerShell by default. As a result, you might encounter an error if you run a command that isn't available in your current profile.
32
-
33
-
For example, when you run a cmdlet that isn't available in your current profile, you'll get the following error. This error can also occur if the cmdlet you run doesn't exist.
To check the API version targeted by your command, run:
38
-
39
-
```powershell
40
-
Find-MgGraphCommand -Command $CommandName
41
-
```
42
-
43
-
Once you establish the right API version to target, confirm your current profile by running:
44
-
45
-
```powershell
46
-
Get-MgProfile
47
-
```
48
-
49
-
Use `Select-MgProfile` to switch between **v1.0** and **beta** versions of the API. To switch to the beta version, run:
50
-
51
-
```powershell
52
-
Select-MgProfile -Name Beta
53
-
```
54
-
55
29
## Authentication and authorization errors
56
30
57
31
Authorization errors can occur due to various issues. Most of these issues generate a 403 error. The common cause for these errors is lack of permissions.
58
32
59
33
To find the permissions required for a specific cmdlet or API, use [Find-MgGraphCommand](find-mg-graph-command.md) cmdlet or the [API permissions reference](/graph/permissions-reference).
60
34
61
-
When you run Connect-MgGraph, you grant consent to Microsoft Graph PowerShell permissions. Here, you specify the permissions that you require using the **-Scopes** parameter.
35
+
When you run **Connect-MgGraph**, you grant consent to Microsoft Graph PowerShell permissions. Here, you specify the permissions that you require using the **-Scopes** parameter.
62
36
63
37
For example, in the error below, the user lacks the permissions to run the New-MgServicePrincipal cmdlet.
0 commit comments