Is there a way to automatically acquire an RDP access token if the user is already logged in with their Entra ID?

Cristi Dima 0 Reputation points
2024-05-17T09:49:30.79+00:00

I have a pretty weird/niche scenario and I'm not really sure if I can automate it- a user is running my application on a Windows machine and they are signed in using their Entra ID. The application will try to generate an RDP access token using the user's credentials.

Looking at the docs we would first need to make an authorization request and then using the generated code, obtain an access token. My question is if there is some way of automating the authorization request. At the moment the user is prompted to open the link in their browser, go through the SSO page and paste the authorization code in the console.

To limit this problem as much as possible, we make the following assumptions:

  • User is already logged in to their Windows machine using the same credentials
  • User does NOT use MFA, only email and password
  • User has provided these credentials to the application

So my question boils down to the following. Is there a way to automate the authorization request knowing that the user is already signed in (so maybe get some token from the Windows session?) or that they have given our application their credentials (I know it's not considered safe, but these are test accounts with very limited permissions; it's just that, for some reason, they're Entra IDs instead of local users).

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,307 questions
0 comments No comments
{count} votes