msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

UserConsentRequest misses UserPrincipalName and Mail Property

Open MichaMican opened this issue 7 months ago • 2 comments

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

  • Make sure you can reproduce this issue using the latest released version of Microsoft.Graph or Microsoft.Graph.Beta.
  • Please search the existing issues to see if there has been a similar issue filed.
  • For issues related to authentication and service errors, please refer to our troubleshooting guide. For service issues, please open a question at https://developer.microsoft.com/graph/support.

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.

MichaMican avatar Jan 22 '24 10:01 MichaMican

Hi @MichaMican ,

You are right, the SDK is correctly interpreting the metadata where "userConsentRequest" is based on "graph.request" which only references "identity" over the set and this only has "id" and "displayName" attributes.

<EntityType Name="request" BaseType="graph.entity">
<Property Name="approvalId" Type="Edm.String"/>
<Property Name="completedDateTime" Type="Edm.DateTimeOffset"/>
<Property Name="createdBy" Type="graph.identitySet"/>

Unfortunately, we in the Microsoft Graph SDK team do not have any ownership of the APIs to add the functionality you need. If you share your idea in the Microsoft 365 Developer Platform forum, it will be possible for others to add upvote and get routed to the appropriate team for them to triage. https://aka.ms/requestgraph

petrhollayms avatar Jun 12 '24 16:06 petrhollayms

@petrhollayms wait a second but the api itself does return the properties properly - Why exactly is this an API issue?

MichaMican avatar Jun 17 '24 06:06 MichaMican