How to get list of Endpoint Statistics and Dangerous Endpoints by using of Azure Mgmt SDK fluent

  • Thread starter Thread starter ganirban_ece
  • Start date Start date
G

ganirban_ece

Guest
Hi All,

I am using Microsoft.Azure.Management.Fluent 1.34.0 for getting resources in Azure with programmatically(C# .NET-Core Web app) and tried to get resources information by providing service principals as below...


string subscriptionId = "xxx";
string clientId = "xxx";
string tenantId = "xxx";
string clientSecret = "xxx";

AzureCredentials cred = new AzureCredentialsFactory()
.FromServicePrincipal(
clientId,
clientSecret,
tenantId,
AzureEnvironment.AzureGlobalCloud
);

var azure = Azure.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
.Authenticate(cred)
.WithSubscription(subscriptionId);

Any sample code(C#.NET-Core Web app) to find out Endpoint Statistics( loop through open ports in NSG and list them in details) and Dangerous Endpoints(loop through open ports in NSG and identify ports like 3389/22).

Pls, advice on above.

Thanks

Continue reading...
 
Back
Top