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
title: IDX14102 Error When Using Microsoft Graph PowerShell
3
-
description: Describes an error that occurs when you run the Microsoft Graph PowerShell Connect-MgGraph cmdlet and provides solutions to it.
4
-
ms.date: 06/18/2025
3
+
description: Resolves an error that occurs when you run the Microsoft Graph PowerShell cmdlet Connect-MgGraph.
4
+
ms.date: 06/30/2025
5
5
ms.service: entra-id
6
6
ms.custom: sap:Problem with using the Graph SDK - libraries
7
7
ms.reviewer: adoyle, willfid, nualex, v-weizhu
8
8
---
9
9
10
10
# Microsoft Graph PowerShell throws error "IDX14102: Unable to decode the header"
11
11
12
-
This article provides solutions to an error "IDX14102: Unable to decode the header" that occurs when you use Microsoft Graph PowerShell.
12
+
This article provides solutions to the error "IDX14102: Unable to decode the header" that occurs when you use Microsoft Graph PowerShell.
13
13
14
14
## Symptoms
15
15
@@ -19,7 +19,7 @@ When running the Microsoft Graph PowerShell command `Connect-MgGraph -AccessToke
19
19
20
20
## Cause
21
21
22
-
This error occurs because an invalid access token is passed to the `AccessToken` parameter of the `Connect-MgGraph` cmdlet. This problem often occurs when the token is acquired via Azure PowerShell's `Get-AzAccessToken` cmdlet and passed as a `SecureString`. This behavior is observed starting with version 5.0.0 of the `Az.Accounts` module. Starting from Microsoft Graph PowerShell version 2.28.0, the `Connect-MgGraph` command only accepts a plaint string for the `AccessToken` parameter.
22
+
This error occurs because an invalid access token is passed to the `AccessToken` parameter of the `Connect-MgGraph` cmdlet. This problem often occurs when the token is obtained via Azure PowerShell's `Get-AzAccessToken` cmdlet and passed as a `SecureString`. This behavior is observed starting with version 5.0.0 of the `Az.Accounts` module. Starting from Microsoft Graph PowerShell version 2.28.0, the `Connect-MgGraph` command accepts only a plain string as the `AccessToken` parameter.
23
23
24
24
## Solution
25
25
@@ -29,9 +29,9 @@ Here are two solutions for resolving this issue:
29
29
30
30
For more information about access tokens, see [Access tokens in the Microsoft identity platform](/entra/identity-platform/access-tokens).
31
31
32
-
- If you use the `Get-AzAccessToken` cmdlet to acquire the access token, use one of the following methods:
32
+
- If you use the `Get-AzAccessToken` cmdlet to obtain the access token, use one of the following methods:
33
33
34
-
- Downgrade `Az.Accounts` to version 4.2.0, to avoid the token being returned as a `SecureString`.
34
+
- Downgrade `Az.Accounts` to version 4.2.0 to avoid the token being returned as a `SecureString`.
35
35
- Convert the token from `SecureString` to `String`:
36
36
37
37
```azurepowershell
@@ -40,4 +40,4 @@ Here are two solutions for resolving this issue:
0 commit comments