A cloud-based identity and access management service for securing user authentication and resource access
Short answer: there is no documented, supported way for a customer-registered application to request these certificates. Your reading of the service principal is right. For a third-party gateway that meets all your constraints, the supported option is a different component, not a different token request.
Your questions, in order
1–2. Direct acquisition from a customer app? Not supported. Nothing in Microsoft's documentation offers a resource scope, delegated permission or consent path for Azure Linux VM Sign-In to a customer application. The Linux VM sign-in article explicitly says third-party OpenSSH clients must use Azure CLI with the SSH extension to get the ephemeral certificate. The MSAL SSH-certificate pages describe the generic token_type=ssh-cert / req_cnf mechanism, not a customer-consumable permission for this resource.
3. First-party only? In practice, yes. A resource with no oauth2PermissionScopes and no appRoles can't be granted to your app through normal consent. Only clients that Microsoft has preauthorized on its side can get tokens for it, and the Azure CLI is the documented one. I can't see Microsoft's internal preauthorization list, but the observable result is the same.
4. Supported API/SDK without Azure CLI or Cloud Shell? None is documented. Calling the endpoint with a Microsoft first-party client ID from your own component (for example, reusing the Azure CLI's client ID) would be impersonating a first-party client. That's unsupported and can break without notice, so I wouldn't build on it.
5. Is Azure CLI the required mechanism for third-party clients? Yes. az ssh cert (or az ssh config to export) is the documented retrieval path, and the user runs it with their own identity.
6. Public first-party identifier? Nothing beyond what the Azure CLI uses internally, and that isn't documented for customer use.
What meets your goal in a supported way
Option A – Azure Bastion with Microsoft Entra ID authentication (recommended)
This is the Microsoft-supported version of what you're building with Guacamole: browser-based SSH, per-user Entra identity, MFA and Conditional Access evaluated at sign-in, authorization through Virtual Machine User/Administrator Login RBAC, no passwords or shared credentials.
- Portal (browser) SSH with Entra ID auth: generally available, Bastion Basic SKU or higher.
- Native client SSH:
az network bastion ssh --auth-type AADrequires the Standard SKU or higher. - The VM needs the
AADSSHLoginForLinuxextension, which you already have for the certificate flow. - Users also need Reader on the VM, its NIC and the Bastion resource.
Option B – Keep Guacamole, with the user generating the certificate
Each user runs the following on their own device:
az login # MFA + Conditional Access apply here
az ssh cert --file ./id_rsa-aadcert.pub
They then supply the short-lived certificate and private key to their Guacamole connection, for example through a per-user connection parameter. Identity, MFA, CA and RBAC are preserved, and Guacamole never sees tokens. The cost is UX: the user handles a private key and repeats this when the certificate expires (about an hour). That makes it workable for a small admin team, not for broad use.
Not recommended: running az on the Guacamole server on behalf of users (device code flow or similar). It means the server holds per-user refresh tokens in the CLI cache, which is exactly what you want to avoid.
References