msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
[Client bug]: the library does not url-encode UPNs
Describe the bug
When looking up an external user by UPN (i.e., of the format aaa.sdd_domain.com#EXT#@tenant.domain) the library does not URL encode the UPN. I get a not found exception as if I requested then UPN with everything after '#' stripped.
To Reproduce
// var upn = System.Net.WebUtility.UrlEncode(upn); Must be un-commented for the request to work
var user = await groupGraphClient.Users[upn].Request().Select("id").GetAsync();
Expected behavior That the library hides all of HTTP shenanigans from the user-programmer. Manually url-encoding the UPN for the call should not be necessary.
Client version 4.14.0