Add 'additionalFields' Field to extract additional data from MSGraph - #122
Open
JRaver wants to merge 1 commit into
Open
Add 'additionalFields' Field to extract additional data from MSGraph#122JRaver wants to merge 1 commit into
JRaver wants to merge 1 commit into
Conversation
Signed-off-by: Yevhen Artemenko <eartemenko@playtika.com>
JRaver
force-pushed
the
feature/add-additional-user-fields
branch
from
July 27, 2026 05:48
5715075 to
75824b3
Compare
Author
|
@kaessert @jakubramut Please take a look on the PR when you will have time. Thanks) |
vtl-1
approved these changes
Jul 29, 2026
|
👍 |
ookolodko
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Adds optional additionalFields []string to the Input type, allowing consumers to include extra Microsoft Graph API attributes in query results beyond the fixed default set. Supported for all four query types: UserValidation, GroupObjectIDs, ServicePrincipalDetails, and GroupMembership.
Implementation notes for reviewers:
Field values are resolved via reflection (GetCity(), GetJobTitle(), etc.) rather than GetAdditionalData(), because the kiota-generated SDK deserializes known Graph properties into typed struct fields — GetAdditionalData() only contains OData extension attributes. The helper falls back to additionalData for true extension attributes.
GroupMembership dynamically builds the nested $expand string (members($select=id,displayName,...,extraField)) to include additional fields in the Graph API request.
Unknown field names are logged at Info level and skipped — no reconcile failure.
Implement #121
Tested with the crossplane v2.3.4
Fixes #
README.md
example/user-validation-additional-fields-example.yaml
fn.go
fn_test.go
input/v1beta1/input.go
input/v1beta1/zz_generated.deepcopy.go
package/input/msgraph.fn.crossplane.io_inputs.yaml
I have: