I'm not sure if this is the best place to ask this question, but it seems to be? I'm creating an ASP.NET MVC website that authenticates with Azure Active Directory. This site will interact with Dynamics 365 entities and I'd like to query and update Dynamics 365 entities with the identity that the user used to log into my site. This is not a multi-tenant application; just an internal tool to help with Dynamics 365 adoption.
I made a post on StackOverflow looking for advice. https://stackoverflow.com/questions/65313201/how-can-i-query-dynamics-365-as-the-logged-in-user-in-an-asp-net-mvc-site-authen
Long story short, I'm using Microsoft.Xrm.Tooling.Connector.CrmServiceClient to connect right now, but this requires a username and password in the connection string and I want to connect with the identity that the user logged in with, but I don't know how to do this. I'm open to changing to a different SDK or package.
I'm having a hard time finding a modern example or documentation that is intended for programmers rather than IT configuration.
When registering the website in Azure, I indicated that the user will need grant permission to interact with Dynamics 365 on their behalf, and I was prompted for this permission when I logged in, but as the programmer, I'm not sure how to actually use this permission.
Any suggestions, documentation links or advice?