Skip to content

Get-FabricSqlDatabase does not process array of workspace correctly #129

Open
@SQLDBAWithABeard

Description

@SQLDBAWithABeard

Problem description

When passing an array to workspace object down the pipeline the function works correctly, however when passing the array as variable it does not

Image

Verbose logs

PS > Get-FabricSQLDatabase -Workspace (Get-FabricWorkspace) -Verbose
VERBOSE: [2025-06-15 16:08:38] [Verbose] Validating token...
VERBOSE: [2025-06-15 16:08:38] [Verbose] Token validation completed.
MetadataError: Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Guid".
VERBOSE: [2025-06-15 16:08:38] [Verbose] Target API Endpoint: https://api.fabric.microsoft.com/v1/workspaces//SqlDatabases
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 152-byte response of content type application/json
VERBOSE: Content encoding: utf-8
[2025-06-15 16:08:38] [Error] Unexpected response code: 400 from the API.
[2025-06-15 16:08:38] [Error] Error: Unable to process the operation due to an error in the request
[2025-06-15 16:08:38] [Error] Error Details:
[2025-06-15 16:08:38] [Error] Error Code: BadRequest

Module Version

pre-release FabricTools 0.30.0 alpha0276

Suggested solution

Use code examples and tests in #128

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions