Skip to content

Get-FabricWorkspaceUser does not return the workspace name #127

@SQLDBAWithABeard

Description

@SQLDBAWithABeard

Problem description

When you pipe a number of workspaces to the Get-FabricWorkspaceUser function, the workspace name is not returned. This reduces the usefulness of the function when dealing with a large number of workspaces.

Here there are 9 workspaces

Image

which gives a result like

Image

Verbose logs

PS > $VerbosePreference = 'Continue'
PS > Get-FabricWorkspace  | Get-FabricWorkspaceUsers
VERBOSE: [2025-06-15 13:08:25] [Verbose] Validating token...
VERBOSE: [2025-06-15 13:08:25] [Verbose] Token validation completed.
VERBOSE: [2025-06-15 13:08:25] [Verbose] Validating token...
VERBOSE: [2025-06-15 13:08:25] [Verbose] Token validation completed.
VERBOSE: [2025-06-15 13:08:25] [Verbose] Target API Endpoint: https://api.fabric.microsoft.com/v1/workspaces
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:25] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/f7b02a8e-52ce-436c-b36b-665e2fae1bcc/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/14b1a253-802d-4331-a0e7-5b9006e87c24/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/b5ec4eb8-9bfc-4e56-8d3d-0b2653d55764/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/472fcf0e-5c62-4425-ae36-a729a5d7b56c/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/0e038765-f051-466d-902e-1269f8739702/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/9c5985b7-7e55-442c-8cbd-9f517f9c6cc3/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/3da64fe1-408f-4423-8c84-761f7c1d09b3/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:26] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/9e52da3e-8c56-42dd-ad44-d4452114c0b3/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
VERBOSE: [2025-06-15 13:08:27] [Verbose] Target API Endpoint: https://api.powerbi.com/v1.0/myorg/groups/34f4ff88-bc66-4e76-b850-2ea8b0ed1ae0/users
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

groupUserAccessRight : Viewer
displayName          : SQLAdmins
identifier           : f1f0057c-53d4-4a73-961a-c3f4501cbce1
principalType        : Group

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : jpomfret7_gmail.com#EXT#@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Jess Pomfret
identifier           : jpomfret7_gmail.com#EXT#@mrrobsewellgmail.onmicrosoft.com
principalType        : User

emailAddress         : fabric_free@mrrobsewellgmail.onmicrosoft.com
groupUserAccessRight : Admin
displayName          : Fabric Free
identifier           : fabric_free@mrrobsewellgmail.onmicrosoft.com
principalType        : User

Module Version

pre-release from development branch

Suggested solution

implement default view solution as per dbatools

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    📒 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions