The login to Intune Portal fails on KDE Plasma with a Misconfiguration(0) error and a [4kv4v] code in the Microsoft auth window - same machine, same user, same tenant works under GNOME, the only difference being XDG_SESSION_DESKTOP.
The root cause: Intune Portal needs the freedesktop Secret portal (org.freedesktop.impl.portal.Secret) to store auth tokens. gnome-keyring implements the Secret portal backend - KWallet does not. So on a pure KDE box the lookup fails before the registration prompt is even shown, which is why you can't proceed past login. That's also why gnome-desktop-minimal "fixes" it: it pulls in gnome-keyring and xdg-desktop-portal-gtk as dependencies.
Three things on top of plain KDE:
1. Install the keyring and the GTK portal backend:
sudo apt install gnome-keyring xdg-desktop-portal-gtk libsecret-1-02. Tell xdg-desktop-portal on KDE to use gnome-keyring for the Secret interface:
sudo install -d -m 0755 /etc/xdg/xdg-desktop-portal
sudo tee /etc/xdg/xdg-desktop-portal/kde-portals.conf >/dev/null <<'EOF'
[preferred]
default=kde
org.freedesktop.impl.portal.Secret=gnome-keyring
EOF3. Make sure gnome-keyring-daemon actually starts in your KDE session. SDDM-based distributions usually pick up the PAM bits automatically once gnome-keyring is installed, but you should log out/in (or reboot) after step 1 so PAM re-evaluates. To verify after re-login:
systemctl --user status gnome-keyring-daemon || pgrep -a gnome-keyring
busctl --user list | grep -i secret # should show org.freedesktop.secretsIf org.freedesktop.secrets is owned, you're good.
4. Wipe Intune's stale cache and try again:
rm -rf ~/.cache/intune-portal ~/.config/intune-portal
intune-portal
But doesn't the KDE Wallet provide the libsecret interface these days? Is this not enough?
