@Shashi Dubey, Thanks for posting in Q&A. Using the cleanWindowsWipe Graph API with the keepUserData parameter set to true will remove all apps and settings from the device, but it will not disconnect the device from on-premises AD. The device will still be hybrid AD joined after the wipe.
https://learn.microsoft.com/en-us/mem/intune/remote-actions/devices-wipe#wipe
If you want do Azure AD join, you can unjoin the device from the on-premises domain, clear the records in both Azure AD and Intune, then enroll using Autopilot Azure AD join enrollment method or configure windows Automatic enrollment and do Azure AD join via Accounts->Access work or school to re-enroll the device.
https://learn.microsoft.com/en-us/mem/intune/fundamentals/deployment-guide-enrollment-windows
Hope the above information can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.