Hi,
The AS Java server, where the IDP is installed, is not required to be joined to any MS domain. The only requirement is that its UME (User Management Engine) is configured against the AD server(s) which you would like to use for username/password verification and retrieving user details. The IDP is using the UME of the underlying AS Java to check user credentials and to retrieve user details.
Active Directory is an LDAP compliant server so you should check the following documentation how to change the UME data source of your AS Java system - LDAP Directory as Data Source - Identity Management - SAP Library.
Regards,
Dimitar