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: Microsoft Graph API Requests Fail to Get B2B Users Using UPN
3
+
description: Provides a solution to an issue where a Microsoft Graph API request fails to get a Business-to-Business (B2B) user using User Principal Name (UPN).
4
+
ms.service: entra-id
5
+
ms.reviewer: bhvootla, v-weizhu
6
+
ms.custom: sap:Problem with querying or provisioning resources
7
+
ms.date: 06/23/2025
8
+
---
9
+
# Microsoft Graph API requests fail to get B2B users using UPN
10
+
11
+
This article provides a solution to an error that occurs when you run a Microsoft Graph API request to get a Business-to-Business (B2B) user using User Principal Name (UPN).
12
+
13
+
## Symptoms
14
+
15
+
When you execute a Microsoft Graph API request to get a B2B user using UPN, you might encounter an error.
"message": "Resource '<resource-id>' does not exist or one of its queried reference-property objects are not present.",
28
+
"innerError": {
29
+
"request-id": "<request-id>",
30
+
"date": "2019-12-05T23:55:40"
31
+
}
32
+
}
33
+
}
34
+
```
35
+
36
+
## Cause
37
+
38
+
The issue occurs because the `#` character in the UPN is treated as a special character in the URL. Everything after the `#` is treated as a fragment and isn't sent over the wire.
39
+
40
+
## Solution
41
+
42
+
To resolve this issue, you must encode the `#` character in the UPN as `%23`.
0 commit comments