Skip to content

fix: add missing navigation properties to alternate key request builders#2541

Open
Ashutosh0x wants to merge 1 commit intomicrosoftgraph:mainfrom
Ashutosh0x:fix/missing-navigation-alternate-keys
Open

fix: add missing navigation properties to alternate key request builders#2541
Ashutosh0x wants to merge 1 commit intomicrosoftgraph:mainfrom
Ashutosh0x:fix/missing-navigation-alternate-keys

Conversation

@Ashutosh0x
Copy link

@Ashutosh0x Ashutosh0x commented Feb 5, 2026

Description

This Pull Request addresses issue #2418 where alternate key request builders (specifically ServicePrincipalsWithAppIdRequestBuilder and UsersWithUserPrincipalNameRequestBuilder) were missing navigation methods (e.g., .appRoleAssignments()) that are standard on primary key paths.

Root Cause Analysis

The SDK is projected from OData metadata. While the AddAlternateKeyPaths setting in the metadata conversion pipeline generates the base paths for alternate keys, it currently does not recursively project sub-navigation properties for these paths.

Changes

  • Added AppRoleAssignments() method to ServicePrincipalsWithAppIdRequestBuilder.
  • Added AppRoleAssignments() method to UsersWithUserPrincipalNameRequestBuilder.
  • Included necessary imports for the corresponding sub-request builders.

Note to Maintainers

I am aware that these files are generated. However, this fix serves as a necessary bridge for Java users until the metadata/generator pipeline can be updated to handle alternate key navigation property propagation globally.

Closes #2418

Adds appRoleAssignments() to ServicePrincipalsWithAppIdRequestBuilder and UsersWithUserPrincipalNameRequestBuilder. This addresses the gap where alternate key paths were missing standard navigation properties available on primary key paths. Closes microsoftgraph#2418
@Ashutosh0x Ashutosh0x requested a review from a team as a code owner February 5, 2026 20:42
@microsoft-github-policy-service
Copy link
Contributor

@Ashutosh0x the command you issued was incorrect. Please try again.

Examples are:

@microsoft-github-policy-service agree

and

@microsoft-github-policy-service agree company="your company"

@Ashutosh0x
Copy link
Author

@microsoft-github-policy-service agree company=skyhighsecurity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

appRoleAssignments is missing from servicePrincipalsWithAppId

1 participant