#13457·FreeRDP

Azure Government AVD .rdpw defaults to commercial AAD authority and WVD scope

Author: wvufan1981Created Sep 20, 2026Updated Sep 25, 2026

Describe the bug

When connecting with FreeRDP 3.31.1 to an Azure Government/DoD AVD workspace using the .rdpw file supplied by the Government AVD web client, FreeRDP correctly connects to the Government AVD gateway (rdgateway-r1.wvd.azure.us) but defaults AAD authentication to the commercial Microsoft cloud.

With the .rdpw unchanged, OpenID discovery is performed against:

login.microsoftonline.com/common

and the browser authentication request uses the commercial AVD scope:

https://www.wvd.microsoft.com/.default

rather than the Azure Government AVD scope:

https://www.wvd.azure.us/.default

The .rdpw itself contains the Government gateway, Government AVD endpoint information, and the AAD tenant ID.

Smart-card/CAC detection itself is working correctly. xfreerdp /list:smartcard successfully enumerates the CAC certificate and ACS ACR39U reader.

To Reproduce

  1. Download an Azure Government/DoD AVD .rdpw file from the Government AVD web client.
  2. Insert the CAC/smart card.
  3. Run:
bash
xfreerdp ~/Downloads/'Army Desktop.rdpw' /smartcard /log-level:DEBUG
  1. Observe that FreeRDP performs OpenID discovery against the commercial cloud:
GET /common/v2.0/.well-known/openid-configuration HTTP/1.1
Host: login.microsoftonline.com
  1. FreeRDP correctly connects to the Government AVD gateway:
rdgateway-r1.wvd.azure.us:443
  1. After the Linux identity broker is unavailable, FreeRDP reports:
Getting AVD token from identity broker failed, falling back to browser-based authentication.
  1. FreeRDP then generates a browser authentication request using:
Authority:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scope:
https://www.wvd.microsoft.com/.default openid profile offline_access

Redirect URI:
https://login.microsoftonline.com/common/oauth2/nativeclient

Using /azure: overrides, I can make FreeRDP generate the Government authority and Government AVD scope. I also tested an explicit avd-access override so that the registered FreeRDP native-client callback remains the commercial /common/oauth2/nativeclient URI.

This produces:

Authority:
https://login.microsoftonline.us/common/oauth2/v2.0/authorize

Scope:
https://www.wvd.azure.us/.default

Redirect URI:
https://login.microsoftonline.com/common/oauth2/nativeclient

However, the current DoD browser authentication flow still does not complete successfully with this combination. Other combinations tested either produce an AADSTS50011 redirect URI mismatch or an unsuccessful cross-cloud browser authentication flow.

Expected behavior

For an Azure Government/DoD AVD .rdpw, I would expect FreeRDP either to infer the appropriate Azure Government AAD authority and AVD scope from the Government AVD configuration, or to provide/document the required /azure: settings for Azure Government.

The expected Government AVD resource/scope appears to be:

https://www.wvd.azure.us/.default

I would like to determine the currently supported configuration for Azure Government/DoD AVD browser authentication and smart-card redirection.

Screenshots

None required at this time.

Application details

  • FreeRDP version:
3.31.1
  • Fedora packages:
freerdp-3.31.1-1.fc44.x86_64
freerdp-libs-3.31.1-1.fc44.x86_64
  • Baseline command:
bash
xfreerdp ~/Downloads/'Army Desktop.rdpw' /smartcard /log-level:DEBUG
  • Relevant build configuration:
WITH_AAD=ON
WITH_PCSC=ON
WITH_PKCS11=ON
WITH_SMARTCARD_PCSC=ON
  • Smart-card reader:
ACS ACR39U ICC Reader
  • xfreerdp /list:smartcard successfully detects the CAC certificate and reader.

  • Government gateway:

rdgateway-r1.wvd.azure.us

A DEBUG log is available, but I have not attached the raw log because it contains tenant/workspace/resource identifiers. I can provide a sanitized log if needed.

Environment (please complete the following information):

  • OS: Linux
  • Version/Distribution: Fedora Linux 44 KDE
  • Architecture: x86_64

Additional context

This appears closely related to previous Azure Government AVD authentication work/discussion in:

  • #10656
  • #11032

The Government .rdpw includes Government-specific AVD configuration, including a *.wvd.azure.us gateway and AAD tenant information, but an unmodified FreeRDP 3.31.1 invocation still begins authentication using commercial OpenID discovery and the commercial www.wvd.microsoft.com scope.

The main questions are:

  1. Should FreeRDP infer the Azure Government AAD authority and www.wvd.azure.us scope from a Government AVD .rdpw/gateway?
  2. If /azure: overrides are currently required, what is the supported combination of ad, use-tenantid, avd-scope, and avd-access for Azure Government/DoD AVD?
  3. Is the mixed Government authority / commercial native-client redirect URI currently expected for this authentication flow?