{"id":6645,"date":"2019-12-18T20:10:54","date_gmt":"2019-12-18T20:10:54","guid":{"rendered":"http:\/\/blogs.aaddevsup.xyz\/?p=6645"},"modified":"2019-12-18T20:10:56","modified_gmt":"2019-12-18T20:10:56","slug":"graph-query-to-get-b2b-user-using-user-principal-name-upn","status":"publish","type":"post","link":"https:\/\/blogs.aaddevsup.xyz\/2019\/12\/graph-query-to-get-b2b-user-using-user-principal-name-upn\/","title":{"rendered":"Graph Query to get B2B user using User Principal Name (UPN)"},"content":{"rendered":"\n
If you are using Microsoft Graph API Query to fetch B2B user using UPN, and experiencing below shown error:<\/p>\n\n\n\n
Query<\/strong>: https:\/\/graph.microsoft.com\/v1.0\/users\/example_gmail.com#EXT#@example.onmicrosoft.com<\/p>\n\n\n\n Response:<\/strong><\/p>\n\n\n\n {<\/p>\n<\/div><\/div>\n\n\n\n ‘error’: {<\/p>\n\n\n\n ‘code’:\n‘Request_ResourceNotFound’,<\/p>\n\n\n\n ‘message’: ‘Resource \u2018*******\u2019\ndoes not exist or one of its queried reference-property objects are not\npresent.’,<\/p>\n\n\n\n ‘innerError’: {<\/p>\n\n\n\n ‘request-id’:\n‘8f390389-b9c6-4f6b-93ba-c531b3d7d595’,<\/p>\n\n\n\n ‘date’:\n‘2019-12-05T23:55:40’<\/p>\n\n\n\n }<\/p>\n\n\n\n }<\/p>\n\n\n\n }<\/p>\n<\/div><\/div>\n\n\n\n Well, here is the fix:<\/p>\n\n\n\n