Skip to content

Added helper function for 25377#849

Merged
merill merged 5 commits intomainfrom
helper-function
Feb 4, 2026
Merged

Added helper function for 25377#849
merill merged 5 commits intomainfrom
helper-function

Conversation

@ashwinikarke
Copy link
Collaborator

No description provided.

@ashwinikarke ashwinikarke self-assigned this Feb 3, 2026
Copy link
Collaborator

@merill merill left a comment

Choose a reason for hiding this comment

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

You can write this as one sql query instead of two to improve performance. Do a union and pick the first one.

@ashwinikarke
Copy link
Collaborator Author

You can write this as one sql query instead of two to improve performance. Do a union and pick the first one.

@merill I’ve updated the code to use a single SQL query with a UNION, as suggested.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new helper function Get-ApplicationNameFromId to resolve application GUIDs to their display names by querying the database. The function is intended to support test assessment 25377, though no test file for that ID exists yet in the repository.

Changes:

  • Added new shared helper function that accepts an array of targets (GUIDs or strings) and resolves GUIDs to application display names from ServicePrincipal and Application database objects
  • Implements GUID validation before database lookup and falls back to returning the original value if resolution fails

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

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

@ashwinikarke has tested with refactored version of the helper function and approved it.

LGTM

Copy link
Collaborator

@merill merill left a comment

Choose a reason for hiding this comment

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

@merill merill merged commit a1b12ae into main Feb 4, 2026
4 checks passed
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.

3 participants