Hello Vatan Jain,
Thank you for reaching out to Microsoft Support!
Yes, you need to Add a redirect uri to your application. Please click Add a platform in Authentication and select web to add the uri. More details can be found in the link, as shown in the following picture:
You can select a registered account type based on your requirements. For details, refer to this document.
For obtaining tokens refer to this document, it should be noted that administrator consent is required for granted permissions, as shown below:
Here are our test results, you can refer to:
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.