From 27a3bb3d0d2080bfda402791c0aae0f9276d8b3c Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 11:41:24 +0300 Subject: [PATCH 1/6] Updated submodule --- microsoftgraph/config/ModulesMapping.jsonc | 31 +++++++++++----------- msgraph-sdk-powershell | 2 +- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/microsoftgraph/config/ModulesMapping.jsonc b/microsoftgraph/config/ModulesMapping.jsonc index 9d36e27684f8..87d8b7d50d86 100644 --- a/microsoftgraph/config/ModulesMapping.jsonc +++ b/microsoftgraph/config/ModulesMapping.jsonc @@ -1,8 +1,8 @@ { "Applications": "^applicationTemplates\\.|^applications\\.|^servicePrincipals\\.|^onPremisesPublishingProfiles\\.|^users.appRoleAssignment$|^groups.appRoleAssignment$", - "Bookings": "^bookingBusinesses\\.|^bookingCurrencies\\.|^solutions.Actions$|^solutions.bookingBusiness$|^solutions.bookingCurrency$|^solutions.virtualEventsRoot$|^solutions.Functions$|^solutions.solutionsRoot$", - "BusinessScenario": "^solutions.businessScenario$", - "BackupRestore": "^solutions.backupRestoreRoot$", + "Bookings": "^bookingBusinesses\\.|^bookingCurrencies\\.|^solutions.booking.*.Actions$|^solutions.bookingBusiness$|^solutions.bookingCurrency$|^solutions.virtualEventsRoot$|^solutions.booking.*.Functions$|^solutions.solutionsRoot$", + "BusinessScenario": "^solutions.businessScenario$|^solutions.BusinessScenario.*.Actions$|^solutions.BusinessScenario.*.Functions$", + "BackupRestore": "^solutions.backupRestoreRoot$|^solutions.backupRestore.*.Actions$|^solutions.backupRestore.*.Functions$", "Calendar": "^places\\.|^users.calendar$|^users.calendarGroup$|^users.event$|^groups.calendar$|^groups.event$", "ChangeNotifications": "^subscriptions\\.", "CloudCommunications": "^users.onlineMeeting$|^users.presence$|^communications\\.", @@ -10,20 +10,19 @@ "CrossDeviceExperiences": "^users.userActivity$|^users.device$", "Devices.CloudPrint": "^print\\.", "Devices.CorporateManagement": "^deviceAppManagement\\.|^officeConfiguration\\.|^users.mobileAppIntentAndState$|^users.mobileAppTroubleshootingEvent$|^users.windowsInformationProtectionDeviceRegistration$|^users.managedAppRegistration$|^users.managedDevice$|^users.deviceManagementTroubleshootingEvent$|^users.deviceEnrollmentConfiguration$", - "Devices.ServiceAnnouncement": "^admin.serviceAnnouncement$|^admin.Actions$|^admin.Functions$", + "Devices.ServiceAnnouncement": "^admin.serviceAnnouncement$|^admin.*.Actions$|^admin.*.Functions$", "DeviceManagement": "^deviceManagement.(deviceCompliancePolicy.*|deviceManagementConfigurationPolicy.*|deviceManagementCompliancePolicy.*|deviceManagementConfigurationSettingDefinition.*|deviceConfiguration.*|managedDevice.*|managementCondition.*|microsoftTunnel.*|userExperienceAnalytics.*|windowsInformationProtection.*|deviceManagement|deviceManagement(DerivedCredentialSettings|Intent|ResourceAccessProfileBase|Script|SettingCategory|SettingDefinition|Template|TroubleshootingEvent)|androidForWork(AppConfigurationSchema|Settings)|androidManagedStore(AccountEnterpriseSettings|AppConfigurationSchema)|deviceAndAppManagementAssignmentFilter|deviceCategory|advancedThreatProtectionOnboardingStateSummary|dataSharingConsent|detectedApp|deviceHealthScript|deviceShellScript|embeddedSIMActivationCodePool|groupPolicyConfiguration|macOSSoftwareUpdateAccountSummary|mobileAppTroubleshootingEvent|notificationMessageTemplate|remoteActionAudit|softwareUpdateStatusSummary|windowsMalwareInformation|windowsQualityUpdateProfile)$|^admin.edge$|^deviceManagement.monitoring$|^users.ListCloudPCs$", "DeviceManagement.Administration": "^deviceManagement.(virtualEndpoint.*|.*Partner.*|.*Certificate.*|.*role.*|deviceManagement(DomainJoinConnector|ExchangeConnector|ExchangeOnPremisesPolicy)|groupPolicy(Category|Definition|DefinitionFile|MigrationReport|ObjectFile|UploadedDefinitionFile)|auditEvent|cartToClassAssociation|comanagementEligibleDevice|deviceAndAppManagementRoleAssignment|intuneBrandingProfile|iosUpdateDeviceStatus|mobileThreatDefenseConnector|ndesConnector|resourceOperation|restrictedAppsViolation|termsAndConditions)", "DeviceManagement.Enrollment": "^deviceManagement.(.*Enrollment.*|.*Autopilot.*|.*depOnboarding.*|importedDeviceIdentity|onPremisesConditionalAccessSettings|windowsFeatureUpdateProfile)$|^roleManagement.roleManagement$|^roleManagement.rbacApplicationMultiple$|^roleManagement.unifiedRbacApplication$", - "DeviceManagement.Actions": "^deviceManagement.Actions$", - "DeviceManagement.Functions": "^deviceManagement.Functions$", - "DirectoryObjects": "^directoryObjects\\.", + "DeviceManagement.Functions": "^deviceManagement.*.Functions$", + "DirectoryObjects": "^directoryObjects\\.|^directory.publicKeyInfrastructureRoot$", "Education": "^education\\.", "Files": "^drives\\.|^shares\\.|^users.drive$|^groups.drive$", "Financials": "^financials\\.", - "Groups": "^groups.group$|^groups.directoryObject$|^groups.conversation$|^groups.endpoint$|^groups.extension$|^groups.groupLifecyclePolicy$|^groups.resourceSpecificPermissionGrant$|^groups.profilePhoto$|^groups.conversationThread$|^groupLifecyclePolicies\\.|^users.group$|^groups.directorySetting$|^groups.Actions$|^groups.Functions$|^groupSettings\\.|^groups.groupSetting$|^groupSettingTemplates\\.", - "Identity.DirectoryManagement": "^administrativeUnits\\.|^contacts\\.|^devices\\.|^domains\\.|^directoryRoles\\.|^directoryRoleTemplates\\.|^directorySettingTemplates\\.|^settings\\.|^subscribedSkus\\.|^contracts\\.|^directory\\.|^users.scopedRoleMembership$|^organization.organization$|^organization.organizationalBranding$|^organization.organizationSettings$|^organization.Actions$|^organization.extension$|^tenantRelationships.Actions$|admin.peopleAdminSettings$|^organization\\.partnerInformation$", - "Identity.Governance": "^accessReviews\\.|^businessFlowTemplates\\.|^programs\\.|^programControls\\.|^programControlTypes\\.|^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedRoleAssignmentRequests\\.|^privilegedApproval\\.|^privilegedOperationEvents\\.|^privilegedAccess\\.|^agreements\\.|^users.agreementAcceptance$|^identityGovernance\\.|^roleManagement.rbacApplication$|^roleManagement.Functions$|roleManagement.Actions$", - "Identity.SignIns": "^organization.certificateBasedAuthConfiguration$|^invitations\\.|^identityProviders\\.|^oauth2PermissionGrants\\.|^identityProtection\\.|^dataPolicyOperations\\.|^identity\\.|^trustFramework\\.|^informationProtection\\.|^policies\\.|^users.authentication$|^users.informationProtection$|^tenantRelationships.multiTenantOrganization$", + "Groups": "^groups.group$|^groups.directoryObject$|^groups.conversation$|^groups.endpoint$|^groups.extension$|^groups.groupLifecyclePolicy$|^groups.resourceSpecificPermissionGrant$|^groups.profilePhoto$|^groups.conversationThread$|^groupLifecyclePolicies\\.|^users.group$|^groups.directorySetting$|^groups.*.Actions$|^groups.*.Functions$|^groupSettings\\.|^groups.groupSetting$|^groupSettingTemplates\\.", + "Identity.DirectoryManagement": "^administrativeUnits\\.|^contacts\\.|^devices\\.|^domains\\.|^directoryRoles\\.|^directoryRoleTemplates\\.|^directorySettingTemplates\\.|^settings\\.|^subscribedSkus\\.|^contracts\\.|^directory\\.|^users.scopedRoleMembership$|^organization.organization$|^organization.organizationalBranding$|^organization.organizationSettings$|^organization.*.Actions$|^organization.extension$|^tenantRelationships.*.Actions$|^tenantRelationships.*.Functions$|admin.peopleAdminSettings$|^organization\\.partnerInformation$", + "Identity.Governance": "^accessReviews\\.|^businessFlowTemplates\\.|^programs\\.|^programControls\\.|^programControlTypes\\.|^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedRoleAssignmentRequests\\.|^privilegedApproval\\.|^privilegedOperationEvents\\.|^privilegedAccess\\.|^agreements\\.|^users.agreementAcceptance$|^identityGovernance\\.|^roleManagement.rbacApplication$|^roleManagement.*.Functions$|roleManagement.*.Actions$", + "Identity.SignIns": "^organization.certificateBasedAuthConfiguration$|^invitations\\.|^identityProviders\\.|^oauth2PermissionGrants\\.|^identityProtection\\.|^dataPolicyOperations\\.|^identity\\.|^trustFramework\\.|^informationProtection\\.|^policies\\.|^users.authentication$|^users.informationProtection$|^tenantRelationships.multiTenantOrganization$|^policies.deviceRegistrationPolicy$|^policies.deviceRegistrationPolicy$", "Identity.Partner": "^tenantRelationships.delegatedAdminRelationship$|^tenantRelationships.delegatedAdminCustomer$", "Mail": "^users.inferenceClassification$|^users.mailFolder$|^users.message$", "ManagedTenants": "^tenantRelationships.managedTenant$", @@ -36,10 +35,10 @@ "SchemaExtensions": "^schemaExtensions\\.", "Search": "^search\\.|^external\\.", "Security": "^security\\.|^users.security$", - "Sites": "^sites.baseSitePage$|^sites.site$|^sites.itemAnalytics$|^sites.columnDefinition$|^sites.contentType$|^sites.drive$|^sites.list$|^sites.sitePage$|^sites.permission$|^sites.store$|^users.site$|^groups.site$|^sites.Functions$|^sites.Actions$|^sites.richLongRunningOperation$|^termStore.sets.ListChildren$|^admin.sharepoint$", + "Sites": "^sites.baseSitePage$|^sites.site$|^sites.itemAnalytics$|^sites.columnDefinition$|^sites.contentType$|^sites.drive$|^sites.list$|^sites.sitePage$|^sites.permission$|^sites.store$|^users.site$|^groups.site$|^sites.*.Functions$|^sites.*.Actions$|^sites.richLongRunningOperation$|^termStore.sets.ListChildren$|^admin.sharepoint$", "Teams": "^teams\\.|^chats\\.|^users.chat$|^appCatalogs.teamsApp$|^users.userTeamwork$|^teamwork\\.|^users.team$|^groups.team$", "Users": "^users.user$|^users.directoryObject$|^users.licenseDetails$|^users.mailboxSettings|^users.notification$|^users.outlookUser$|^users.profilePhoto$|^users.userSettings$|^users.extension$|^users.oAuth2PermissionGrant$|^users.todo$|^users.itemInsights$|^users.servicePrincipal$", - "Users.Actions": "^users.Actions$", - "Users.Functions": "^users.Functions$", - "WindowsUpdates": "^admin.adminWindows$|^admin.Actions$|^admin.Functions$" -} \ No newline at end of file + "Users.Actions": "^users.*.Actions$", + "Users.Functions": "^users.*.Functions$", + "WindowsUpdates": "^admin.adminWindows$" + } \ No newline at end of file diff --git a/msgraph-sdk-powershell b/msgraph-sdk-powershell index b29a8c590b63..c05630a0ede4 160000 --- a/msgraph-sdk-powershell +++ b/msgraph-sdk-powershell @@ -1 +1 @@ -Subproject commit b29a8c590b6346c0b364e064ec7ee529878e9e19 +Subproject commit c05630a0ede41daef6b4f0f29660cc81ef93cb8a From 86ee5473d19e598de9bcfbe62c9a095d9bb04d39 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 14:50:34 +0300 Subject: [PATCH 2/6] Added uninstall step first --- azure-pipelines/update-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines/update-template.yml b/azure-pipelines/update-template.yml index 0f3cb7d30b63..93be2d9bb5d4 100644 --- a/azure-pipelines/update-template.yml +++ b/azure-pipelines/update-template.yml @@ -5,6 +5,8 @@ steps: targetType: 'inline' pwsh: true script: | + Uninstall-Module Microsoft.Graph -Force -AllVersions -ErrorAction SilentlyContinue + Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions -ErrorAction SilentlyContinue try{ # Try to update the V1 module first. Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber From 4c7590946ff5ba2ebb8af143c80abfb2e235a4ad Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 14:57:53 +0300 Subject: [PATCH 3/6] Updated credscan suppression --- .../config/credscan/credscan-suppressions.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/config/credscan/credscan-suppressions.json b/azure-pipelines/config/credscan/credscan-suppressions.json index ac67494abd75..b7959eb8904d 100644 --- a/azure-pipelines/config/credscan/credscan-suppressions.json +++ b/azure-pipelines/config/credscan/credscan-suppressions.json @@ -57,14 +57,21 @@ "file": [ "msgraph-sdk-powershell\\src\\Users.Actions\\beta\\examples\\Test-MgBetaUserPassword.md", "msgraph-sdk-powershell\\src\\Users.Actions\\beta\\examples\\Update-MgBetaUserPassword.md", - "msgraph-sdk-powershell\\src\\Users.Actions\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md", "msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Update-MgUserPassword.md", "msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md", - "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Reset-MgBetaUserAuthenticationMethodPassword.md", - "microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Users.Actions\\Reset-MgUserAuthenticationMethodPassword.md" + "microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Users.Actions\\Reset-MgUserAuthenticationMethodPassword.md", + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Users.Actions\\Convert-MgUserExternalToInternalMemberUser.md", + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Convert-MgBetaUserExternalToInternalMemberUser.md" ], "_justification": "[Users.Actions] Examples contain random values recognized as secret" }, + { + "file": [ + "msgraph-sdk-powershell\\src\\Identity.SignIns\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md", + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md" + ], + "_justification": "[Identity.SignIns] Examples contain random values recognized as secret" + }, { "file": [ "msgraph-sdk-powershell\\src\\DeviceManagement.Actions\\beta\\examples\\Update-MgBetaDeviceManagementVirtualEndpointOnPremiseConnectionAdDomainPassword.md", From a0409cee0852c2480b7dab8470145c558e3156f9 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 15:34:41 +0300 Subject: [PATCH 4/6] Update credscan --- azure-pipelines/config/credscan/credscan-suppressions.json | 5 ++++- azure-pipelines/update-template.yml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/config/credscan/credscan-suppressions.json b/azure-pipelines/config/credscan/credscan-suppressions.json index b7959eb8904d..f37d084bb86c 100644 --- a/azure-pipelines/config/credscan/credscan-suppressions.json +++ b/azure-pipelines/config/credscan/credscan-suppressions.json @@ -60,8 +60,11 @@ "msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Update-MgUserPassword.md", "msgraph-sdk-powershell\\src\\Users.Actions\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md", "microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Users.Actions\\Reset-MgUserAuthenticationMethodPassword.md", + "msgraph-sdk-powershell\\src\\Users.Actions\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md", + "microsoftgraph\\graph-powershell-1.0\\Microsoft.Graph.Beta.Users.Actions\\Reset-MgBetaUserAuthenticationMethodPassword.md", "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Users.Actions\\Convert-MgUserExternalToInternalMemberUser.md", - "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Convert-MgBetaUserExternalToInternalMemberUser.md" + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Convert-MgBetaUserExternalToInternalMemberUser.md", + "msgraph-sdk-powershell\\src\\Users.Actions\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md" ], "_justification": "[Users.Actions] Examples contain random values recognized as secret" }, diff --git a/azure-pipelines/update-template.yml b/azure-pipelines/update-template.yml index 93be2d9bb5d4..404e0d4786ec 100644 --- a/azure-pipelines/update-template.yml +++ b/azure-pipelines/update-template.yml @@ -5,8 +5,8 @@ steps: targetType: 'inline' pwsh: true script: | - Uninstall-Module Microsoft.Graph -Force -AllVersions -ErrorAction SilentlyContinue - Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions -ErrorAction SilentlyContinue + Uninstall-Module Microsoft.Graph -Force -AllVersions -Force + Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions -Force try{ # Try to update the V1 module first. Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber From 81990487f669b2263f578841d94f551d2cac2383 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 15:45:33 +0300 Subject: [PATCH 5/6] Rectified errors --- azure-pipelines/update-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/update-template.yml b/azure-pipelines/update-template.yml index 404e0d4786ec..8dae790857a6 100644 --- a/azure-pipelines/update-template.yml +++ b/azure-pipelines/update-template.yml @@ -5,8 +5,8 @@ steps: targetType: 'inline' pwsh: true script: | - Uninstall-Module Microsoft.Graph -Force -AllVersions -Force - Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions -Force + Uninstall-Module Microsoft.Graph -Force -AllVersions + Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions try{ # Try to update the V1 module first. Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber From b844a589d6986af5040140f20c2a7e1802da21be Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Fri, 28 Feb 2025 16:09:10 +0300 Subject: [PATCH 6/6] Added try catch --- .../config/credscan/credscan-suppressions.json | 4 +++- azure-pipelines/update-template.yml | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/config/credscan/credscan-suppressions.json b/azure-pipelines/config/credscan/credscan-suppressions.json index f37d084bb86c..3dbda2d8d3ca 100644 --- a/azure-pipelines/config/credscan/credscan-suppressions.json +++ b/azure-pipelines/config/credscan/credscan-suppressions.json @@ -71,7 +71,9 @@ { "file": [ "msgraph-sdk-powershell\\src\\Identity.SignIns\\beta\\examples\\Reset-MgBetaUserAuthenticationMethodPassword.md", - "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md" + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Identity.SignIns\\Reset-MgBetaUserAuthenticationMethodPassword.md", + "msgraph-sdk-powershell/src\\Identity.SignIns\\v1.0\\examples\\Reset-MgUserAuthenticationMethodPassword.md", + "microsoftgraph\\graph-powershell-beta\\Microsoft.Graph.Beta.Users.Actions\\Reset-MgBetaUserAuthenticationMethodPassword.md" ], "_justification": "[Identity.SignIns] Examples contain random values recognized as secret" }, diff --git a/azure-pipelines/update-template.yml b/azure-pipelines/update-template.yml index 8dae790857a6..b5e61558ca3a 100644 --- a/azure-pipelines/update-template.yml +++ b/azure-pipelines/update-template.yml @@ -5,8 +5,14 @@ steps: targetType: 'inline' pwsh: true script: | - Uninstall-Module Microsoft.Graph -Force -AllVersions - Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions + try{ + # Try to uninstall the beta module first. + Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions + Uninstall-Module Microsoft.Graph.Beta -Force -AllVersions + }catch{ + # If the module is installed, uninstall it. + echo "Error when uninstalling Beta" + } try{ # Try to update the V1 module first. Install-Module Microsoft.Graph.Beta -Repository PSGallery -Scope AllUsers -AcceptLicense -SkipPublisherCheck -Force -AllowClobber