microsoftgraph / microsoftgraph/msgraph-sdk-powershell

UserConsentRequest misses UserPrincipalName and Mail Property

Open
#2,539 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Investigation type:feature
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:

Describe the bug
When using Get-MgIdentityGovernanceAppConsentRequestUserConsentRequest the UserPrincipalName and Mail properties of the CreatedBy.User Property is stored in additionalProperties instead of own explicit Properties

To Reproduce
Steps to reproduce the behavior:

  1. Execute Get-MgIdentityGovernanceAppConsentRequestUserConsentRequest
  2. See that UserPrincipalName and Mail is in the AdditionalProperties field

Expected behavior
UserPrincipalName and Mail should be its own parameters of the identity Object

Debug Output
image

Module Version
2.12

Environment Data
Both Powershell 5.1 and 7.4

Additional context
I believe this issue is due to the documentation its derived from. The userConsentRequests references the identitySet which references a generic identity Class. As identity is polymorphic it only contains displayName and id.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Get-MgIdentityGovernanceAppConsentRequestUserConsentRequest cmdlet and inspect how CreatedBy.User is represented. Compare the generated identity model with the linked userConsentRequest, identitySet, and identity documentation; done means UserPrincipalName and Mail are exposed as explicit properties rather than only through AdditionalProperties.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.