Skip to content

Commit 68e42bf

Browse files
authored
Merge branch 'dev' into main
2 parents 27e1f1a + 31bea4e commit 68e42bf

File tree

703 files changed

+158867
-146061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

703 files changed

+158867
-146061
lines changed

.azure-pipelines/ci-build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
Pack: ${{ parameters.Pack }}
6060
Sign: ${{ parameters.Sign }}
6161

62+
- template: ./common-templates/guardian-analyzer.yml
63+
6264
- ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}:
6365
- template: ./common-templates/esrp/codesign-nuget.yml
6466
parameters:

.azure-pipelines/common-templates/create-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
parameters:
55
- name: BaseBranch
66
type: string
7-
default: features/2.0
7+
default: dev
88
- name: TargetBranch
99
type: string
1010
default: ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# Managed code static analysis (aka.ms/sdtvsts)
5+
# https://marketplace.visualstudio.com/items?itemName=securedevelopmentteam.vss-secure-development-tools
6+
7+
steps:
8+
- task: RoslynAnalyzers@3
9+
displayName: 'Run Roslyn Analyzers'
10+
inputs:
11+
continueOnError: true
12+
msBuildVersion: 17.0
13+
msBuildArchitecture: amd64
14+
msBuildCommandline: |
15+
dotnet.exe build $(Build.SourcesDirectory)\src\Authentication /p:Platform="Any CPU" /p:Configuration="Release"
16+
setupCommandlinePicker: 'vs2022'
17+
policyName: 'M365'
18+
env:
19+
SYSTEM_ACCESSTOKEN: $(system.accesstoken)

.azure-pipelines/generation-templates/authentication-module.yml

+3
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ steps:
6060
pwsh: true
6161
script: |
6262
. $(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1 -Pack -ArtifactsLocation $(Build.ArtifactStagingDirectory)
63+
64+
# Run analyzer after build & sign.
65+
- template: ../common-templates/guardian-analyzer.yml

.azure-pipelines/generation-templates/meta-module.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ steps:
2222
script: |
2323
$(System.DefaultWorkingDirectory)/tools/GenerateMetaModule.ps1
2424
25+
- template: ../common-templates/guardian-analyzer.yml
26+
2527
- ${{ if eq(parameters.Sign, true) }}:
2628
- template: ../common-templates/esrp/codesign.yml
2729
parameters:

.azure-pipelines/generation-templates/workload-modules.yml

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ steps:
2121
script: |
2222
. $(System.DefaultWorkingDirectory)/tools/GenerateModules.ps1 -EnableSigning:$${{ parameters.Sign }} -Build -ExcludeExampleTemplates -ExcludeNotesSection
2323
24+
- template: ../common-templates/guardian-analyzer.yml
25+
2426
- task: PowerShell@2
2527
displayName: Test Workload Modules
2628
enabled: false
@@ -30,6 +32,14 @@ steps:
3032
script: |
3133
. $(System.DefaultWorkingDirectory)/tools/GenerateModules.ps1 -SkipGeneration -Test
3234
35+
- task: PowerShell@2
36+
displayName: Find Duplicate Commands
37+
inputs:
38+
targetType: inline
39+
pwsh: true
40+
script: |
41+
. $(System.DefaultWorkingDirectory)/tools/PostGeneration/FindDuplicateCommand.ps1 -SourcePath "$(System.DefaultWorkingDirectory)/src/"
42+
3343
- ${{ if eq(parameters.Sign, true) }}:
3444
- template: ../common-templates/esrp/strongname.yml
3545
parameters:

.github/policies/msgraph-sdk-powershell-branch-protection.yml

+56-16
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,44 @@ resource: repository
99
configuration:
1010
branchProtectionRules:
1111

12-
- branchNamePattern: main
13-
# This branch pattern applies to the following branches as of 06/12/2023 10:31:18:
14-
# main
12+
- branchNamePattern: dev
13+
# This branch pattern applies to the following branches as of approximately 08/25/2023 14:07:25:
14+
# dev
1515

1616
# Specifies whether this branch can be deleted. boolean
1717
allowsDeletions: false
1818
# Specifies whether forced pushes are allowed on this branch. boolean
1919
allowsForcePushes: false
2020
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
21-
dismissStaleReviews: false
21+
dismissStaleReviews: true
2222
# Specifies whether admins can overwrite branch protection. boolean
2323
isAdminEnforced: false
2424
# Indicates whether "Require a pull request before merging" is enabled. boolean
2525
requiresPullRequestBeforeMerging: true
2626
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
2727
requiredApprovingReviewsCount: 1
2828
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
29-
requireCodeOwnersReview: false
29+
requireCodeOwnersReview: true
3030
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
3131
requiresCommitSignatures: false
3232
# Are conversations required to be resolved before merging? boolean
33-
requiresConversationResolution: false
33+
requiresConversationResolution: true
3434
# Are merge commits prohibited from being pushed to this branch. boolean
3535
requiresLinearHistory: false
36+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
37+
requiredStatusChecks:
38+
- license/cla
39+
- GitOps/AdvancedSecurity
3640
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
3741
requiresStrictStatusChecks: true
3842
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
3943
restrictsPushes: false
4044
# Restrict who can dismiss pull request reviews. boolean
4145
restrictsReviewDismissals: false
4246

43-
- branchNamePattern: dev
44-
# This branch pattern applies to the following branches as of 06/12/2023 10:31:18:
45-
# dev
47+
- branchNamePattern: features/[0-9]*
48+
# This branch pattern applies to the following branches as of approximately 08/25/2023 14:07:25:
49+
# features/2.0
4650

4751
# Specifies whether this branch can be deleted. boolean
4852
allowsDeletions: false
@@ -61,22 +65,22 @@ configuration:
6165
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
6266
requiresCommitSignatures: false
6367
# Are conversations required to be resolved before merging? boolean
64-
requiresConversationResolution: false
68+
requiresConversationResolution: true
6569
# Are merge commits prohibited from being pushed to this branch. boolean
6670
requiresLinearHistory: false
6771
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
6872
requiredStatusChecks:
69-
- license/cla
73+
- GitOps/AdvancedSecurity
7074
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
7175
requiresStrictStatusChecks: true
7276
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
7377
restrictsPushes: false
7478
# Restrict who can dismiss pull request reviews. boolean
7579
restrictsReviewDismissals: false
7680

77-
- branchNamePattern: features/[0-9]*
78-
# This branch pattern applies to the following branches as of 06/12/2023 10:31:18:
79-
# features/2.0
81+
- branchNamePattern: main
82+
# This branch pattern applies to the following branches as of approximately 08/25/2023 14:07:25:
83+
# main
8084

8185
# Specifies whether this branch can be deleted. boolean
8286
allowsDeletions: false
@@ -91,18 +95,54 @@ configuration:
9195
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
9296
requiredApprovingReviewsCount: 1
9397
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
94-
requireCodeOwnersReview: false
98+
requireCodeOwnersReview: true
9599
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
96100
requiresCommitSignatures: false
97101
# Are conversations required to be resolved before merging? boolean
98-
requiresConversationResolution: false
102+
requiresConversationResolution: true
99103
# Are merge commits prohibited from being pushed to this branch. boolean
100104
requiresLinearHistory: false
101105
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
102106
requiredStatusChecks:
107+
- GitOps/AdvancedSecurity
103108
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
104109
requiresStrictStatusChecks: true
105110
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
106111
restrictsPushes: false
107112
# Restrict who can dismiss pull request reviews. boolean
108113
restrictsReviewDismissals: false
114+
115+
- branchNamePattern: support/*
116+
# This branch pattern applies to the following branches as of approximately 08/25/2023 14:07:25:
117+
# support/1.x
118+
119+
# Specifies whether this branch can be deleted. boolean
120+
allowsDeletions: false
121+
# Specifies whether forced pushes are allowed on this branch. boolean
122+
allowsForcePushes: false
123+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
124+
dismissStaleReviews: true
125+
# Specifies whether admins can overwrite branch protection. boolean
126+
isAdminEnforced: false
127+
# Indicates whether "Require a pull request before merging" is enabled. boolean
128+
requiresPullRequestBeforeMerging: true
129+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
130+
requiredApprovingReviewsCount: 1
131+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
132+
requireCodeOwnersReview: true
133+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
134+
requiresCommitSignatures: false
135+
# Are conversations required to be resolved before merging? boolean
136+
requiresConversationResolution: true
137+
# Are merge commits prohibited from being pushed to this branch. boolean
138+
requiresLinearHistory: false
139+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
140+
requiredStatusChecks:
141+
- GitOps/AdvancedSecurity
142+
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
143+
requiresStrictStatusChecks: true
144+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
145+
restrictsPushes: false
146+
# Restrict who can dismiss pull request reviews. boolean
147+
restrictsReviewDismissals: false
148+

config/ModuleMetadata.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"authors": "Microsoft",
44
"copyright": "© Microsoft Corporation. All rights reserved.",
55
"description": "Microsoft Graph PowerShell module",
6-
"iconUri": "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/features/2.0/docs/images/graph_color256.png",
6+
"iconUri": "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/docs/images/graph_color256.png",
77
"licenseUri": "https://aka.ms/devservicesagreement",
88
"owners": "Microsoft",
99
"projectUri": "https://github.com/microsoftgraph/msgraph-sdk-powershell",
@@ -27,15 +27,15 @@
2727
"versions": {
2828
"authentication": {
2929
"prerelease": "",
30-
"version": "2.3.0"
30+
"version": "2.5.0"
3131
},
3232
"beta": {
3333
"prerelease": "",
34-
"version": "2.3.0"
34+
"version": "2.5.0"
3535
},
3636
"v1.0": {
3737
"prerelease": "",
38-
"version": "2.3.0"
38+
"version": "2.5.0"
3939
}
4040
}
4141
}

config/ModulesMapping.jsonc

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Devices.CloudPrint": "^print\\.",
1010
"Devices.CorporateManagement": "^deviceAppManagement\\.|^officeConfiguration\\.|^users.mobileAppIntentAndState$|^users.mobileAppTroubleshootingEvent$|^users.windowsInformationProtectionDeviceRegistration$|^users.managedAppRegistration$|^users.managedDevice$|^users.deviceManagementTroubleshootingEvent$|^users.deviceEnrollmentConfiguration$",
1111
"Devices.ServiceAnnouncement": "^admin.serviceAnnouncement$|^admin.Actions$|^admin.Functions$",
12-
"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)$|^admin.edge$|^deviceManagement.monitoring$|^users.ListCloudPCs$",
12+
"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$",
1313
"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)",
1414
"DeviceManagement.Enrollment": "^deviceManagement.(.*Enrollment.*|.*Autopilot.*|.*depOnboarding.*|importedDeviceIdentity|onPremisesConditionalAccessSettings|windowsFeatureUpdateProfile)$|^roleManagement.roleManagement$|^roleManagement.rbacApplicationMultiple$",
1515
"DeviceManagement.Actions": "^deviceManagement.Actions$",
@@ -19,9 +19,9 @@
1919
"Files": "^drives\\.|^shares\\.|^users.drive$|^groups.drive$",
2020
"Financials": "^financials\\.",
2121
"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\\.",
22-
"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$",
22+
"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$",
2323
"Identity.Governance": "^accessReviews\\.|^businessFlowTemplates\\.|^programs\\.|^programControls\\.|^programControlTypes\\.|^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedRoleAssignmentRequests\\.|^privilegedApproval\\.|^privilegedOperationEvents\\.|^privilegedAccess\\.|^agreements\\.|^users.agreementAcceptance$|^identityGovernance\\.|^roleManagement.rbacApplication$|^roleManagement.Functions$|roleManagement.Actions$",
24-
"Identity.SignIns": "^organization.certificateBasedAuthConfiguration$|^invitations\\.|^identityProviders\\.|^oauth2PermissionGrants\\.|^identityProtection\\.|^dataPolicyOperations\\.|^identity\\.|^trustFramework\\.|^informationProtection\\.|^policies\\.|^users.authentication$|^users.informationProtection$|^policies.tokenLifetimePolicy$|^policies.tokenIssuancePolicy$|^policies.homeRealmDiscoveryPolicy$|^policies.claimsMappingPolicy$",
24+
"Identity.SignIns": "^organization.certificateBasedAuthConfiguration$|^invitations\\.|^identityProviders\\.|^oauth2PermissionGrants\\.|^identityProtection\\.|^dataPolicyOperations\\.|^identity\\.|^trustFramework\\.|^informationProtection\\.|^policies\\.|^users.authentication$|^users.informationProtection$|^tenantRelationships.multiTenantOrganization$",
2525
"Identity.Partner": "^tenantRelationships.delegatedAdminRelationship$|^tenantRelationships.delegatedAdminCustomer$",
2626
"Mail": "^users.inferenceClassification$|^users.mailFolder$|^users.message$",
2727
"ManagedTenants": "^tenantRelationships.managedTenant$",
@@ -33,7 +33,7 @@
3333
"SchemaExtensions": "^schemaExtensions\\.",
3434
"Search": "^search\\.|^external\\.",
3535
"Security": "^security\\.|^users.security$",
36-
"Sites": "^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$",
36+
"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$",
3737
"Teams": "^teams\\.|^chats\\.|^users.chat$|^appCatalogs.teamsApp$|^users.userTeamwork$|^teamwork\\.|^users.team$|^groups.team$",
3838
"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$",
3939
"Users.Actions": "^users.Actions$",

0 commit comments

Comments
 (0)