Enable Get-FabricWorkspaceUser to accept pipeline input#128
Merged
Enable Get-FabricWorkspaceUser to accept pipeline input#128
Conversation
…75 Updated the Get-FabricWorkspaceUser function to enhance readability and maintainability. Added additional examples to the documentation for better user guidance. Improved the process block to handle multiple workspaces and return user details more effectively. Thank you!
This commit introduces a comprehensive set of unit tests for the Get-FabricWorkspaceUser function. The tests validate parameter presence, alias functionality, and ensure correct behavior when handling multiple workspaces. This enhancement improves code reliability and maintainability. Thank you!
Added unit tests for the `Get-FabricWorkspaceUser` function to ensure it operates correctly with multiple workspaces, both in the pipeline and as parameters. Updated the function to support pipeline input for `WorkspaceId` and `WorkspaceName`, and renamed `Get-FabricWorkspaceUsers` to its singular form for consistency. Thank you!
Updated the test case to wrap the command in a script block for better readability and consistency. This change enhances the clarity of the test and aligns with best practices for PowerShell testing. Thank you!
Linux Test Results4 572 tests 4 571 ✅ 40s ⏱️ Results for commit 0f7d2fe. ♻️ This comment has been updated with latest results. |
WinPS51 Test Results4 777 tests 4 776 ✅ 51s ⏱️ Results for commit 0f7d2fe. ♻️ This comment has been updated with latest results. |
WinPS71 Test Results4 777 tests 4 776 ✅ 52s ⏱️ Results for commit 0f7d2fe. ♻️ This comment has been updated with latest results. |
should never be required but use lessons learned from the database code Enhance the Get-FabricWorkspaceUser function to ensure that it properly checks for null responses from the PowerBI API before adding users to the return value. This change improves the robustness of the function and prevents potential errors when no users are returned. Thank you!
NowinskiK
requested changes
Jun 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Enable Get-FabricWorkspaceUser to accept pipeline input and rename for singularity
Pull Request (PR) description
Get-FabricWorkspaceUserto support pipeline input forWorkspaceIdandWorkspaceNameparameters. Functions should accept input from the pipeline #75Get-FabricWorkspaceUsersto match the singular form Function Naming #26Get-FabricWorkspaceUserfunction to ensure it works correctly # with multiple workspaces both in the pipeline and passed to a parameter.Get-FabricWorkspaceUserfunction to ensure backward compatibility.New Unit tests to aid other contributors.

Tested with multiple workspaces passing to the workspace parameter

Tested with multiple workspaces passed along the pipeline
Tested with a workspaceid
Tested example that adds workspace to output
Task list
build.ps1 -ResolveDependency -Tasks build, test).Build and Test succeeded locally