I think, Just creating the user should be fine. This user can be used to connect to DB using code as shown in below 2 blogs
Edit #1
For Managed Identity access, see if this helps
----------
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav