1. Navigate to Azure portal > Services > Azure Entra ID

  1. Click on Enterprise Applications > Create a New Application


  1. Click on Create your own Application and provide a name.
    Select Integrate any other application you don’t find in the gallery (Non-gallery) > Create


  1. Once in the Application, click on Set up Single Sign-on and choose SAML


  1. Make sure SSL is enabled on the Cloudstack management server.
    Login to Cloudstack UI > Global settings > Access > Saml and set the following:
saml2.enabled=true
saml2.redirect.url=http://<mgmtip>:8080/client
saml2.sp.slo.url=http://<mgmtip>:8080/client
saml2.sp.sso.url=http://<mgmtip>:8080/client/api?command=samlSso
  1. Restart the Cloudstack Management service and execute the API to get the SP Metadata for Cloudstack

    https://cloudstack.apache.org/api/apidocs-4.19/apis/getSPMetadata.html
> curl
> [http://\<mgmt\>:8080/client/api?command=getSpMetadata](http://10.0.32.234:8080/client/api?command=getSpMetadata) \>
> metadata.xml
  1. Upload the generated metadata XML into Azure Entra

Upload Metadata

Azure Entra Upload

  1. Navigate to Attributes and Claims, then click Edit.
    You can either create a new attribute or copy an existing attribute.

Attributes and Claims

Edit Claims

Let the attribute name be:

http://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstname

  1. Navigate to SAML Certificates and copy the App Federation Metadata URL.

SAML Certificates

  1. In CloudStack > Global Settings, populate the values and restart the CloudStack management service.
saml2.idp.metadata.url=https://login.microsoftonline.com/58fb75e6-9db3-4492-b319-a095a08786ce/federationmetadata/2007-06/federationmetadata.xml?appid=024a61e1-afa6-46b1-85da-622aa259f8
saml2.user.attribute=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstname
  1. Go back to the Azure Entra Application, then add an existing Azure user to the application.

Add User

Assign User

  1. In CloudStack, create a user account and select the SAML IDP.
    The details should be the same as the Azure account.

CloudStack User

  1. Login via SAML SSO.

SAML Login

  1. Test using the SAML Tracer browser extension:
    Firefox Add-on: SAML Tracer

SAML Tracer