using System.Security.Cryptography;
string message = "{\"partnerId\":6445742,\"data\":{\"ownedItemIds\":[4154939],\"event\":\"ApplicationComplete\",\"applicationReference\":\"b871b64b-57bd-d72b-f768-54b18284ceab\",\"partyId\":10197237,\"partnerReference\":\"ioanatestletalliance2\",\"departmentReference\":\"ioanatestletalliance2\",\"dataShared\":true},\"correlationId\":\"5c754761-16c5-4489-a2d7-2de5abeda0be\",\"id\":\"806784bf-4351-43e2-8bd3-11fff9833711\",\"event\":\"ApplicationComplete\",\"createdDate\":\"2022-09-05T11:06:16.2767868+00:00\"}";
var encoding = new System.Text.ASCIIEncoding();
byte[] keyByte = encoding.GetBytes(secret);
byte[] messageBytes = encoding.GetBytes(message);
using var hmacsha256 = new HMACSHA256(keyByte);
byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
var signature = (Convert.ToBase64String(hashmessage));
Console.WriteLine(signature);