Hello @MS Techie Thanks for being patient while checking on this. Another way of doing it using PowerShell is shared in this document.
Example 11 in the above document is suitable for interactive login
Example 12 is for SPN usage
Example 13 is for Managed Identity usage
Please do let us know if you have further query. Thanks