Skip to content

Conversation

dougvm
Copy link

@dougvm dougvm commented Aug 20, 2025

Description: Make it so that if -Top and -All aren't called, it will throw a warning to notify the user that they might not be seeing all possible results.

NOTE: This is my first time making a PR, I wasn't sure where to put my CLA? And also it doesn't seem like there are any PR templates?

Make it so that if -Top and -All aren't called, it will throw a warning to notify the user that they might not be seeing all results.
@dougvm dougvm requested a review from a team as a code owner August 20, 2025 02:34
Copy link

Learn Build status updates of commit acc92c2:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • Line 0, Column 0: [Error: PSMD2Yaml_FileLoadFailed] Failed to load file: C:/LocalRun/W/nvds-s/module/mapping/monikerMapping.json. PackageRoot, ReferenceTocUrl, and ConceptualTocUrl are required for every moniker. PackageRoot should be a valid relative path to docset root.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@dougvm
Copy link
Author

dougvm commented Aug 20, 2025

This link is broken.

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

@@ -71,6 +71,9 @@ function Get-EntraUserMembership {
$params["All"] = $PSBoundParameters["All"]
}
}
elseif (-not $PSBoundParameters.ContainsKey("Top")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be a standalone if statement like all of the other parameter checks that precede it. 👍

@@ -71,6 +71,9 @@ function Get-EntraUserMembership {
$params["All"] = $PSBoundParameters["All"]
}
}
elseif (-not $PSBoundParameters.ContainsKey("Top")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add any additional logic to detect if the query is returning less objects than the default API limit, and only show the warning if there might be more?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the exact same question but honestly just didn't have enough experience with APIs in general / the Graph API to know for sure. With that in mind though, I thought that doing the warning after receiving the response but before sending the object so that it appears along with any other warnings might work nicely enough?

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