feat(wrapper-runtime): shared runtime base classes and client lifetime - #3739
Open
Joywambui-maina wants to merge 2 commits into
Open
feat(wrapper-runtime): shared runtime base classes and client lifetime#3739Joywambui-maina wants to merge 2 commits into
Joywambui-maina wants to merge 2 commits into
Conversation
…e base class Microsoft.Graph.Wrapper.Runtime hosts what every generated cmdlet duplicated: GraphClientCmdlet owns -AccessToken/-Headers and transport acquisition - the session path reuses one request adapter keyed to the session HttpClient's identity (rebuilt on reconnect), the token path shares one HttpClient with per-request auth headers instead of leaking a connection pool per call. GraphRouteAttribute, UntypedValue and the bearer provider move here from the per-module Shared.g.cs. 22 pinned tests; emitted code unchanged until the emitter adopts the base class in the follow-up.
Every generated cmdlet now derives from GraphClientCmdlet: transport, the -AccessToken/-Headers surface and Graph error translation come from Microsoft.Graph.Wrapper.Runtime instead of being repeated per file, and the per-module Shared.g.cs is gone. The corpus shrinks ~417k lines (30%) with zero behavioral change: operation inventory unchanged (11,719 = 11,719), parity identical (9,548 of 10,385), omission oracle 0 failures, 38/38 build from a clean index snapshot. Also fixes the parity gate picking the runtime dll for modules sorting after R, and repo-root discovery in git worktrees.
Joywambui-maina
requested review from
Ramses Sanchez-Hernandez (ramsessanchez)
and
a lite review from Copilot
August 21, 2026 20:00
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared wrapper runtime layer so generated wrapper cmdlets can inherit common Graph client concerns (auth/session vs -AccessToken, request headers, and consistent Graph error translation) instead of duplicating that logic per cmdlet. It also updates wrapper projects to reference the shared runtime to enable improved client/request-adapter lifetime behavior.
Changes:
- Added
Microsoft.Graph.Wrapper.Runtime(netstandard2.0) with shared cmdlet base/runtime helpers (e.g.,GraphClientCmdlet,GraphRouteAttribute, untyped conversion helpers, and token/session adapter helpers). - Updated generated wrapper cmdlets to derive from
GraphClientCmdlet, removing duplicated-AccessToken/-Headersparameter declarations and switching to shared error translation (ThrowGraphRequestFailed). - Updated wrapper module projects to reference the shared runtime project.
Reviewed changes
Copilot reviewed 243 out of 11813 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/GraphWrapperRuntime/Runtime/Microsoft.Graph.Wrapper.Runtime.csproj | New shared runtime project packaging common cmdlet/runtime functionality. |
| src/GraphWrapperRuntime/Runtime/GraphRouteAttribute.cs | Moves/introduces GraphRouteAttribute into shared runtime for tooling/verification. |
| src/GraphWrapperRuntime/Runtime/StaticBearerTokenAuthenticationProvider.cs | Adds minimal auth provider for -AccessToken requests. |
| src/GraphWrapperRuntime/Runtime/SessionAdapterCache.cs | Adds session HttpClient → request adapter caching for reuse across invocations. |
| src/GraphWrapperRuntime/Runtime.Tests/Microsoft.Graph.Wrapper.Runtime.Tests.csproj | New unit test project for runtime behaviors. |
| src/GraphWrapperRuntime/Runtime.Tests/StaticBearerTokenAuthenticationProviderTests.cs | Tests token stamping and token isolation behavior. |
| src/GraphWrapperRuntime/Runtime.Tests/SessionAdapterCacheTests.cs | Tests adapter caching keyed by session HttpClient identity. |
| src/Sites/wrapper/v1.0/Microsoft.Graph.Wrapper.Sites.csproj | Adds runtime project reference to wrapper module. |
| src/Security/wrapper/v1.0/Microsoft.Graph.Wrapper.Security.csproj | Adds runtime project reference to wrapper module. |
| src/Search/wrapper/v1.0/Microsoft.Graph.Wrapper.Search.csproj | Adds runtime project reference to wrapper module. |
| src/SchemaExtensions/wrapper/v1.0/Microsoft.Graph.Wrapper.SchemaExtensions.csproj | Adds runtime project reference to wrapper module. |
| src/Reports/wrapper/v1.0/Microsoft.Graph.Wrapper.Reports.csproj | Adds runtime project reference to wrapper module. |
| src/Planner/wrapper/v1.0/Microsoft.Graph.Wrapper.Planner.csproj | Adds runtime project reference to wrapper module. |
| src/PersonalContacts/wrapper/v1.0/Microsoft.Graph.Wrapper.PersonalContacts.csproj | Adds runtime project reference to wrapper module. |
| src/People/wrapper/v1.0/Microsoft.Graph.Wrapper.People.csproj | Adds runtime project reference to wrapper module. |
| src/Notes/wrapper/v1.0/Microsoft.Graph.Wrapper.Notes.csproj | Adds runtime project reference to wrapper module. |
| src/Mail/wrapper/v1.0/Microsoft.Graph.Wrapper.Mail.csproj | Adds runtime project reference to wrapper module. |
| src/Identity.SignIns/wrapper/v1.0/Microsoft.Graph.Wrapper.Identity.SignIns.csproj | Adds runtime project reference to wrapper module. |
| src/Identity.Partner/wrapper/v1.0/Microsoft.Graph.Wrapper.Identity.Partner.csproj | Adds runtime project reference to wrapper module. |
| src/Identity.Governance/wrapper/v1.0/Microsoft.Graph.Wrapper.Identity.Governance.csproj | Adds runtime project reference to wrapper module. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Microsoft.Graph.Wrapper.Identity.DirectoryManagement.csproj | Adds runtime project reference to wrapper module. |
| src/Groups/wrapper/v1.0/Microsoft.Graph.Wrapper.Groups.csproj | Adds runtime project reference to wrapper module. |
| src/Files/wrapper/v1.0/Microsoft.Graph.Wrapper.Files.csproj | Adds runtime project reference to wrapper module. |
| src/Education/wrapper/v1.0/Microsoft.Graph.Wrapper.Education.csproj | Adds runtime project reference to wrapper module. |
| src/DirectoryObjects/wrapper/v1.0/Microsoft.Graph.Wrapper.DirectoryObjects.csproj | Adds runtime project reference to wrapper module. |
| src/Devices.ServiceAnnouncement/wrapper/v1.0/Microsoft.Graph.Wrapper.Devices.ServiceAnnouncement.csproj | Adds runtime project reference to wrapper module. |
| src/Devices.CorporateManagement/wrapper/v1.0/Microsoft.Graph.Wrapper.Devices.CorporateManagement.csproj | Adds runtime project reference to wrapper module. |
| src/Devices.CloudPrint/wrapper/v1.0/Microsoft.Graph.Wrapper.Devices.CloudPrint.csproj | Adds runtime project reference to wrapper module. |
| src/DeviceManagement/wrapper/v1.0/Microsoft.Graph.Wrapper.DeviceManagement.csproj | Adds runtime project reference to wrapper module. |
| src/DeviceManagement.Functions/wrapper/v1.0/Microsoft.Graph.Wrapper.DeviceManagement.Functions.csproj | Adds runtime project reference to wrapper module. |
| src/DeviceManagement.Enrollment/wrapper/v1.0/Microsoft.Graph.Wrapper.DeviceManagement.Enrollment.csproj | Adds runtime project reference to wrapper module. |
| src/DeviceManagement.Administration/wrapper/v1.0/Microsoft.Graph.Wrapper.DeviceManagement.Administration.csproj | Adds runtime project reference to wrapper module. |
| src/CrossDeviceExperiences/wrapper/v1.0/Microsoft.Graph.Wrapper.CrossDeviceExperiences.csproj | Adds runtime project reference to wrapper module. |
| src/ConfigurationManagement/wrapper/v1.0/Microsoft.Graph.Wrapper.ConfigurationManagement.csproj | Adds runtime project reference to wrapper module. |
| src/Compliance/wrapper/v1.0/Microsoft.Graph.Wrapper.Compliance.csproj | Adds runtime project reference to wrapper module. |
| src/CloudCommunications/wrapper/v1.0/Microsoft.Graph.Wrapper.CloudCommunications.csproj | Adds runtime project reference to wrapper module. |
| src/ChangeNotifications/wrapper/v1.0/Microsoft.Graph.Wrapper.ChangeNotifications.csproj | Adds runtime project reference to wrapper module. |
| src/Calendar/wrapper/v1.0/Microsoft.Graph.Wrapper.Calendar.csproj | Adds runtime project reference to wrapper module. |
| src/Bookings/wrapper/v1.0/Microsoft.Graph.Wrapper.Bookings.csproj | Adds runtime project reference to wrapper module. |
| src/BackupRestore/wrapper/v1.0/Microsoft.Graph.Wrapper.BackupRestore.csproj | Adds runtime project reference to wrapper module. |
| src/Applications/wrapper/v1.0/Microsoft.Graph.Wrapper.Applications.csproj | Adds runtime project reference to wrapper module. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgChatPinnedMessage.g.cs | Converts cmdlet to GraphClientCmdlet base and uses shared error translation. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgChat.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Teams/wrapper/v1.0/Cmdlets/GetMgAppCatalogTeamApp.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgSitePermission.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgSiteList.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Sites/wrapper/v1.0/Cmdlets/GetMgSite.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Search/wrapper/v1.0/Cmdlets/GetMgSearchQna.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Search/wrapper/v1.0/Cmdlets/GetMgSearchBookmark.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Search/wrapper/v1.0/Cmdlets/GetMgSearchAcronym.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Search/wrapper/v1.0/Cmdlets/GetMgExternalConnection.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Mail/wrapper/v1.0/Cmdlets/GetMgUserMessage.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Planner/wrapper/v1.0/Cmdlets/GetMgPlannerTask.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Planner/wrapper/v1.0/Cmdlets/GetMgPlannerPlan.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Planner/wrapper/v1.0/Cmdlets/GetMgPlannerBucket.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgUserDrive.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgShare.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgGroupDrive.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Files/wrapper/v1.0/Cmdlets/GetMgDrive.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupSettingTemplate.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupLifecyclePolicy.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupExtension.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroupConversation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Groups/wrapper/v1.0/Cmdlets/GetMgGroup.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgUserEvent.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgUserCalendar.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsWorkspace.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsSection.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsRoomList.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsRoom.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsFloor.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsDesk.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgPlaceAsBuilding.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Calendar/wrapper/v1.0/Cmdlets/GetMgGroupEvent.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Bookings/wrapper/v1.0/Cmdlets/GetMgVirtualEventWebinar.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Bookings/wrapper/v1.0/Cmdlets/GetMgVirtualEventTownhall.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Bookings/wrapper/v1.0/Cmdlets/GetMgVirtualEvent.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Bookings/wrapper/v1.0/Cmdlets/GetMgBookingCurrency.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Bookings/wrapper/v1.0/Cmdlets/GetMgBookingBusiness.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Applications/wrapper/v1.0/Cmdlets/GetMgServicePrincipal.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Applications/wrapper/v1.0/Cmdlets/GetMgApplicationTemplate.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Applications/wrapper/v1.0/Cmdlets/GetMgApplication.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/ChangeNotifications/wrapper/v1.0/Cmdlets/GetMgSubscription.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationPresence.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationOnlineMeeting.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationCallRecord.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/CloudCommunications/wrapper/v1.0/Cmdlets/GetMgCommunicationCall.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Compliance/wrapper/v1.0/Cmdlets/GetMgPrivacySubjectRightsRequest.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Devices.CloudPrint/wrapper/v1.0/Cmdlets/GetMgPrintShare.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Devices.CloudPrint/wrapper/v1.0/Cmdlets/GetMgPrintService.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Devices.CloudPrint/wrapper/v1.0/Cmdlets/GetMgPrintPrinter.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Devices.CloudPrint/wrapper/v1.0/Cmdlets/GetMgPrintOperation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Devices.CloudPrint/wrapper/v1.0/Cmdlets/GetMgPrintConnector.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/DeviceManagement/wrapper/v1.0/Cmdlets/GetMgDeviceManagementManagedDevice.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/DeviceManagement/wrapper/v1.0/Cmdlets/GetMgDeviceManagementDeviceConfiguration.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/DeviceManagement/wrapper/v1.0/Cmdlets/GetMgDeviceManagementDeviceCategory.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/DeviceManagement/wrapper/v1.0/Cmdlets/GetMgDeviceManagementDetectedApp.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/DirectoryObjects/wrapper/v1.0/Cmdlets/GetMgDirectoryObject.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationUser.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationSchool.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeSchool.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeRubric.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeClass.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationMeAssignment.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Education/wrapper/v1.0/Cmdlets/GetMgEducationClass.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgRiskyUser.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgRiskDetection.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgIdentityProvider.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgIdentityApiConnector.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.SignIns/wrapper/v1.0/Cmdlets/GetMgDataPolicyOperation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.Governance/wrapper/v1.0/Cmdlets/GetMgAgreement.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgSubscribedSku.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgOrganization.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDomain.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectorySubscription.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryRoleTemplate.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryRole.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryRecoverySnapshot.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryDeletedItem.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryAttributeSet.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDirectoryAdministrativeUnit.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgDevice.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgContract.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Identity.DirectoryManagement/wrapper/v1.0/Cmdlets/GetMgContact.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityTriggerRetentionEvent.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityThreatIntelligenceHost.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityThreatIntelligenceArticle.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecuritySubjectRightsRequest.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecuritySecureScore.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityLabelRetentionLabel.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityLabelDepartment.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityLabelCitation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityLabelCategory.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityLabelAuthority.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityIncident.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityIdentitySensorCandidate.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityIdentitySensor.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityIdentityHealthIssue.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityIdentityAccount.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAuditLogQuery.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationTraining.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationPayload.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationOperation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationLoginPage.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationLandingPage.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulationAutomation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAttackSimulation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAlertV2.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Security/wrapper/v1.0/Cmdlets/GetMgSecurityAlert.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Reports/wrapper/v1.0/Cmdlets/GetMgReportPartnerBillingOperation.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Reports/wrapper/v1.0/Cmdlets/GetMgReportPartnerBillingManifest.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Reports/wrapper/v1.0/Cmdlets/GetMgAuditLogSignIn.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/Reports/wrapper/v1.0/Cmdlets/GetMgAuditLogDirectoryAudit.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
| src/SchemaExtensions/wrapper/v1.0/Cmdlets/GetMgSchemaExtension.g.cs | Converts cmdlet to GraphClientCmdlet base and removes duplicated parameters. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Closes #3710
Changes proposed in this pull request
Microsoft.Graph.Wrapper.Runtime(netstandard2.0,src/GraphWrapperRuntime/):GraphClientCmdletowns what every generated cmdlet previously duplicated — the-AccessToken/-Headersparameters, transport acquisition, and Graph errortranslation — plus
GraphRouteAttribute,UntypedValueand the bearer provider moved from the per-moduleShared.g.cs, which is no longer emitted.ApiClient(re-registering 7 serializer factories each call), and every-AccessTokencall leaks an undisposedHttpClientconnection pool. Now the session path reuses one adapter keyed to the sessionHttpClient's reference identity — rebuilt exactly when Connect-MgGraph/Set-MgRequestContext/Disconnect-MgGraph replace the client — and the token path shares oneHttpClientwith per-request Authorization. Measured cost of the old path: 2.44–3.00 µs and 2,144.6–2,144.8 B per invocation vs ~1.1 µs / 1,456 B reused (in-process construction cost only).ProjectReferencevia the template. The corpus shrinks by ~417k lines (1,380,063 → 968,378, −30%) across 11,719 files, 38 modules.Validation — every gate run three times, identical results
git archiveof the index with kiota off PATH; 38/38 assemblies read.NETStandard,Version=v2.0from their own metadata[Parameter]inheritance proven in both PowerShell hosts before the design was committed)