Base solution for your next web application

Activities of "rafael sotelo"

This is the value given by Azure:

"NVmTdZoOF98hmb4fBA9eOvoCbF4TBQbOS_14OJwPXLM"

Not exactly a GUID, but is an identifier given automatically when i logon using azure active directory

Hi I'm using azure active directory for my WebApp, the user id is GUID given automatically by azure active directory, so im having problems with this code:

public long? UserId { get { var userId = Thread.CurrentPrincipal.Identity.GetUserId(); if (string.IsNullOrEmpty(userId)) { return null; }

            return Convert.ToInt64(userId);

Exception Details: System.FormatException: Input string was not in a correct format.

What can i do ?

Showing 1 to 2 of 2 entries