Can you try below samples and see if it helps. The complete samples is there on the GitHub service-bus-dotnet-management.
private static async Task CreateSubscription()
{
try
{
if (string.IsNullOrEmpty(namespaceName))
{
throw new Exception("Namespace name is empty!");
}
var token = await GetToken();
var creds = new TokenCredentials(token);
var sbClient = new ServiceBusManagementClient(creds)
{
SubscriptionId = appOptions.SubscriptionId,
};
var subscriptionParams = new SBSubscription
{
MaxDeliveryCount = 10
};
Console.WriteLine("Creating subscription...");
await sbClient.Subscriptions.CreateOrUpdateAsync(resourceGroupName, namespaceName, TopicName, SubscriptionName, subscriptionParams);
Console.WriteLine("Created subscription successfully.");
}
catch (Exception e)
{
Console.WriteLine("Could not create a subscription...");
Console.WriteLine(e.Message);
throw e;
}
}