Azure / Azure/azure-powershell

[Az.Accounts] Return warning "org.freedesktop.DBus.Error.ServiceUnknown" when dbus-user-session package is installed

Open
#14,207 10 comments 1 reaction 0 assignees View on GitHub
Authentication customer-reported question
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description
After installing `dbus-user-session` package on Ubuntu 18.04 , `Import-Module Az.Accounts` has returned `** Message: 17:43:58.624: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files` which has broken our CI due to writing to the stderr.
This issue doesn't reproduce on Ubuntu 20.04 where the `dbus-user-session` package is pre-installed by default or using sudo.

## Steps to reproduce

```powershell
apt-get install -y dbus-user-session
reboot
```

## Environment data

```
No LSB modules are available.
Distributor ID:Ubuntu
Description:Ubuntu 18.04.5 LTS
Release:18.04
Codename:bionic
```

## Module versions

```powershell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.2.5 Az.Accounts {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connect-AzAccount…}
```

## Error output

```
$ pwsh -command "Import-Module Az.Accounts"
** Message: 17:43:58.624: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
** Message: 17:43:58.630: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
** Message: 17:43:58.633: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files

journalclt -e
Feb 15 17:43:58 powershell[16735]: Microsoft.Identity.Client.Extensions.TraceSource Error: 0 :
Feb 15 17:43:58 powershell[16735]: [MSAL.Extension][2021-02-15T17:43:58.6249328Z] An error was encountered while saving secret to keyring in the MsalCacheStorage domain:'95' co
Feb 15 17:43:58 powershell[16735]: Microsoft.Identity.Client.Extensions.TraceSource Error: 0 :
Feb 15 17:43:58 powershell[16735]: [MSAL.Extension][2021-02-15T17:43:58.6308996Z] An error was encountered while reading secret from keyring in the MsalCacheStorage domain:'95'
Feb 15 17:43:58 powershell[16735]: Microsoft.Identity.Client.Extensions.TraceSource Error: 0 :
Feb 15 17:43:58 powershell[16735]: [MSAL.Extension][2021-02-15T17:43:58.6340969Z] An error was encountered while clearing secret from keyring in the MsalCacheStorage domain:'95

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `Import-Module Az.Accounts` on Ubuntu 18.04 after installing `dbus-user-session`, then trace the Az.Accounts import path and the MSAL keyring operations shown in the error output. Done means the module imports without writing the `org.freedesktop.DBus.Error.ServiceUnknown` warning to stderr while retaining the existing behavior on supported systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux, powershell
Domain
authentication, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.