Skip to content

Fix opening browser on Linux by treating URL as 1 argument instead of many#5261

Merged
gautamdsheth merged 1 commit intopnp:devfrom
NoelTautges:FixLinuxOpeningBrowser
Mar 7, 2026
Merged

Fix opening browser on Linux by treating URL as 1 argument instead of many#5261
gautamdsheth merged 1 commit intopnp:devfrom
NoelTautges:FixLinuxOpeningBrowser

Conversation

@NoelTautges
Copy link
Contributor

Type

  • Bug Fix
  • New Feature
  • Sample

What is in this Pull Request ?

On Linux, PnP can fail to open a browser for authentication when running Register-PnPEntraIDAppForInteractiveLogin and other similar commands. It tries a series of commands like xdg-open with a single argument for the URL in order to open a browser. However, that URL may contain spaces. OpenLinuxBrowser is using ProcessStartInfo with the constructor that treats the string as all the arguments, meaning that any URLs with spaces get split apart and not opened by the tool. This PR fixes the issue by using the ProcessStartInfo constructor with a list of arguments, forcing it to treat any URL with spaces as only 1 argument.

@gautamdsheth gautamdsheth merged commit 61b4a60 into pnp:dev Mar 7, 2026
3 checks passed
@gautamdsheth
Copy link
Collaborator

Thanks @NoelTautges , merged it ! Will be available starting with tomorrow's nightly builds.

Awesome to have you contributing 😍

@NoelTautges NoelTautges deleted the FixLinuxOpeningBrowser branch March 7, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants