Below is my method when I break pointed the method, it reached the queueName local variable and was null there it does not perform the contents of the If.
private void AddToQueue(OrderDetails orderDetails)
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=example;AccountKey=hidden==;EndpointSuffix=core.windows.net");
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
var queueName = User.Claims.Where(e => e.Type == "jti").FirstOrDefault();
if (queueName != null)
{
CloudQueue queue = queueClient.GetQueueReference(queueName.Value);
queue.CreateIfNotExistsAsync();
var addqueue = queue.AddMessageAsync(new CloudQueueMessage(JsonConvert.SerializeObject(orderDetails)));
//need to add a variable which will retrieve all orders from the queue.
}
}