msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
UserConsentRequest misses UserPrincipalName and Mail Property
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:
- Execute Get-MgIdentityGovernanceAppConsentRequestUserConsentRequest
- 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
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.
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 wait a second but the api itself does return the properties properly - Why exactly is this an API issue?