I get two different SIDs for the same user when the user logs in through the Azure Web App (ASP.NET MVC) and Xamarin.iOS
Customization
Azure WebApp ASP.NET 5 with API Controllers
Xamarin iOS app with Microsoft.WindowsAzure.Mobile.Client SDK Azure B2C AAD
User online
I get the ObjectIdentifier value, which is the AID SID:
var userClaim = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;
User on mobile devices
I get only NameIDifier and not ObjectIdentifier
ClaimsPrincipal mobileUser = this.User as ClaimsPrincipal; var mobileUserClaim = mobileUser.FindFirst("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier");
The SID is completely different, the SID for user authentication from Mobile receives SID: xxxx, while from the Web it receives xxx
I know that if I configure one Azure Mobile application and one Azure Web App, then the SID will be identical during authentication. But I do not want to manage two sites for the small size of my application. The purpose of the application is a simple web application to perform certain actions and the same actions on the phone, from the phone I use the Azure Mobile Service SDK and InvokeAPIAsync to use the API controller in the web application.
thanks
source share