There are a few different parts to your question. I'll try to cover each of them separately. I'll start with simple one first.
1. GET for Enterprise Applications (why you're getting a not found right now)
I can also get an specific app by doing a GET like this
https://graph.microsoft.com/beta/applications/f0bc4548-deaf-c0de-a123-586b578cf357
Note that the Id is the object Id and not the AppId
If I try the above with the object id of an enterprise app I get not
found.
What you see as "Enterprise application" in Azure Portal is actually called "Service principal" behind the scene from API standpoint. Right now you're looking for it in the list of "applications" (which correspond to "App registrations" from Azure portal standpoint) and hence not able to find it.
So if you're looking for any enterprise app using Microsoft Graph Explorer, try using this Microsoft Graph beta endpoint (Service Principal GET)
GET https://graph.microsoft.com/beta/servicePrincipals
or
GET https://graph.microsoft.com/beta/servicePrincipals/{id}
Registered application, Service principal and their relationship
I would also suggest read this documentation about Applications, Service principals and relationship between them on Microsoft Docs. It's a lot more detailed than what I can explain briefly here. One very important point, especially for multi tenant apps from this documentation being, consider the application object as the global representation of your application for use across all tenants, and the service principal as the local representation for use in a specific tenant.
2. Your initial question about creating Enterprise application (v2) programmatically using .NET code
a. Creating a "Registered application"
You can do this using Create Application endpoint. This is the one you have mentioned as well.
NOTE: This same endpoint can be used for creating both Azure AD V1 or V2 applications. As long as you have enough permissions this works fine for both. I've tested this myself too. For V2, I just signed in with a user that belonged to that directory and had Global Admin role.
POST https://graph.microsoft.com/beta/applications
How to do this using .NET (say C# code).
It would be great to do this using Microsoft Graph Library for .NET, but I haven't found anything for applications there quickly enough, probably because this is only available in Beta endpoint and SDK uses the stable v1.0 metadata.
In any case, you can always directly call the endpoint using C# code like this:
string json = "{ \"displayName\": \"My Cool App 1\"}";
string graphRequest = $"{graphResourceUri}/beta/applications";
HttpClient client = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, graphRequest);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", authResult.AccessToken);
request.Content = new StringContent(json, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.SendAsync(request);
b. Creating Enterprise application (or Service principal)
AFAIK this is not possible even using the beta endpoint for Microsoft Graph API. I say this because for Service principals related Microsoft Graph documentation I only see List, Get and Update, but no Create.
If you still need to do this, it is possible using the Azure AD Graph API. In fact if you're doing this for a production application, you should consider using Azure AD Graph API since beta endpoint for Microsoft Graph is not guaranteed to be stable all the time and breaking changes can come in without any notice.
Even though you should be using Microsoft Graph instead of Azure AD Graph API whenever possible, Application management related scenarios belong to the few cases where Microsoft Graph API hasn't caught up yet.
Azure AD Graph API Documentation for Service Principal
Take a look at the Supported operations. Create (POST) is available there.
