Skip to content

Commit 1c9810c

Browse files
authored
Merge pull request MicrosoftDocs#281 from msewaweru/troubleshooting-update-sdk-v2
Updated the troubleshooting article to factor in SDK v2 changes
2 parents 74c9acb + 8fd5198 commit 1c9810c

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

microsoftgraph/docs-conceptual/troubleshooting.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Error handling and troubleshooting cmdlets"
33
description: "Learn how to diagnose common errors in Microsoft Graph PowerShell"
44

55
ms.topic: troubleshooting
6-
ms.date: 08/11/2022
6+
ms.date: 05/22/2023
77
ms.author: eunicewaweru
88
manager: CelesteDG
99
author: msewaweru
@@ -20,45 +20,19 @@ Before troubleshooting any errors, make sure that you're running the most recent
2020
Get-InstalledModule
2121
```
2222

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:
2424

2525
```PowerShell
2626
Update-Module Microsoft.Graph
2727
```
2828

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.
34-
35-
:::image type="content" source="images/profile-error.png" alt-text="profile-related-error":::
36-
37-
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-
5529
## Authentication and authorization errors
5630

5731
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.
5832

5933
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).
6034

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.
6236

6337
For example, in the error below, the user lacks the permissions to run the New-MgServicePrincipal cmdlet.
6438

0 commit comments

Comments
 (0)