Forum Discussion
lgouveajr
Jun 10, 2024Copper Contributor
Replacement for S4UClient.UpnLogon in Windows Identity Foundation
Good morning, I need a replacement for the S4UClient.UpnLogon to be used with Windows Identity Foundation. The goal was to impersonate the SPWeb.CurrentUser in order to make a REST API call using HttpClient. However, the error "The name provided is not a properly formed account name" is encountered.
I tried to create an instance of Windows Identity using only SPWeb.CurrentUser.Name, but this resulted in the error "A specified logon session does not exist. It may already have been terminated."
Additionally, I tried to create an instance of Windows Identity with a static user (Example: "CONTOSO\user1"), but this also led to the error "A specified logon session does not exist. It may already have been terminated."
No RepliesBe the first to reply