Skip to content

Enganga/update entra invited user sponsors from invited by #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

emmanuel-karanja
Copy link
Collaborator

Porting of Update-MsIdInvitedUserSponsporsFromInvitedBy for both GA and Beta

Copy link

Learn Build status updates of commit f2fb163:

⚠️ Validation status: warnings

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ⚠️Warning View (entra-powershell-beta-preview) Details
module/docs/entra-powershell-v1.0/Users/Update-EntraInvitedUserSponsorsFromInvitedBy.md ⚠️Warning View (entra-powershell-preview) Details
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/Entra/Microsoft.Entra/Users/Update-EntraInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/Entra/Users/Update-EntraInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md

  • Line 119, Column 1: [Warning: file-not-found - See documentation] Invalid file link: 'Update-EntraBetaUser.md'.

module/docs/entra-powershell-v1.0/Users/Update-EntraInvitedUserSponsorsFromInvitedBy.md

  • Line 119, Column 1: [Warning: file-not-found - See documentation] Invalid file link: 'Update-EntraUser.md'.

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.

For any questions, please:

@emmanuel-karanja emmanuel-karanja force-pushed the enganga/Update-EntraInvitedUserSponsorsFromInvitedBy branch from 789ea81 to c9d49d6 Compare February 14, 2025 04:38
Copy link

Learn Build status updates of commit c9d49d6:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit af0ab89:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit f77f57b:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit e616c7e:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@KenitoInc KenitoInc force-pushed the enganga/Update-EntraInvitedUserSponsorsFromInvitedBy branch from e616c7e to a6a6587 Compare March 6, 2025 09:58
Copy link

Learn Build status updates of commit a6a6587:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit b8db6c5:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit 61194f2:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit d043f9e:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests..ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

…d' value and hence we don't the inline function. Updated tests
@emmanuel-karanja emmanuel-karanja added the P0 Highest priority label Mar 21, 2025
Copy link

Learn Build status updates of commit 564adae:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/Entra/Microsoft.Entra/Reports/Get-EntraCrossTenantAccessActivity.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@emmanuel-karanja emmanuel-karanja added the Ready For Review The PR Ready for Review label Mar 21, 2025
Copy link

Learn Build status updates of commit 79e3157:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Test-EntraBetaCommandPrerequisite.ps1 ✅Succeeded
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit c624de3:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit 33627e4:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Collaborator

@KenitoInc KenitoInc left a comment

Choose a reason for hiding this comment

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

The design for this cmdlet is messy

  1. Get users and expand sponsors
  2. Use the user id to invoke /users/id/invitedBy

This is duplication. The first request also returns the sponsor, then the second request gets the sponsor using an API request.

This design should be either

  1. Get-EntraUser and select UserId only.
  2. Call /Users/<Id>/sponsors end point to return the sponsors.

or

  1. Get-MgUser with ExpandProperty. Get the value of the sponsors from the response

Note:
For v1.0, endpoint is /Users/<Id>/sponsors
For beta, endpoint can either be /Users/<Id>/sponsors or /Users/<Id>/invitedBy

@KenitoInc
Copy link
Collaborator

Also we could run one API call
/Users?$filter=CreationType eq 'Invitation'&$expand=Sponsors

Then pick the sponsors array and craft a response

Copy link

Learn Build status updates of commit 9c667ee:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit 2fff099:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit 7ae84d4:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit dd7c32f:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit d757cd7:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link

Learn Build status updates of commit 2220b91:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

…hell into enganga/Update-EntraInvitedUserSponsorsFromInvitedBy
Copy link

Learn Build status updates of commit 330a446:

✅ Validation status: passed

File Status Preview URL Details
module/docs/entra-powershell-beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.md ✅Succeeded View (entra-powershell-beta-preview)
module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.ps1 ✅Succeeded
test/EntraBeta/Users/Update-EntraBetaInvitedUserSponsorsFromInvitedBy.Tests.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Highest priority Ready For Review The PR Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants