Hello JAMES MCCLELLAN,
Looks like you are trying to get inboundNatRulePortMappings from the LoadBalancer programmatically.
You could you a rest api call with the details to get the port mappings. For example:
GET  https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping?api-version=2024-05-01
or if it's specific to (C# code), you can refer below example code
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Network.Models;
using Azure.ResourceManager.Network;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-05-01/examples/QueryInboundNatRulePortMapping.json
// this example is just showing the usage of "LoadBalancers_ListInboundNatRulePortMappings" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://free.blessedness.top/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BackendAddressPoolResource created on azure
// for more information of creating BackendAddressPoolResource, please refer to the document of BackendAddressPoolResource
string subscriptionId = "subid";
string groupName = "rg1";
string loadBalancerName = "lb1";
string backendPoolName = "bp1";
ResourceIdentifier backendAddressPoolResourceId = BackendAddressPoolResource.CreateResourceIdentifier(subscriptionId, groupName, loadBalancerName, backendPoolName);
BackendAddressPoolResource backendAddressPool = client.GetBackendAddressPoolResource(backendAddressPoolResourceId);
// invoke the operation
QueryInboundNatRulePortMappingContent content = new QueryInboundNatRulePortMappingContent
{
    IPAddress = "10.0.0.4",
};
ArmOperation<BackendAddressInboundNatRulePortMappings> lro = await backendAddressPool.GetInboundNatRulePortMappingsLoadBalancerAsync(WaitUntil.Completed, content);
BackendAddressInboundNatRulePortMappings result = lro.Value;
Console.WriteLine($"Succeeded: {result}");
For other language examples, please refer: https://free.blessedness.top/en-us/rest/api/load-balancer/load-balancers/list-inbound-nat-rule-port-mappings?view=rest-load-balancer-2024-05-01&tabs=dotnet#query-inbound-nat-rule-port-mapping