Skip to content

Commit 9daa867

Browse files
authored
Merge pull request #135 from microsoftgraph/dev
Build and release of 0.2.0 modules
2 parents 824ded5 + 82f8d34 commit 9daa867

File tree

5,779 files changed

+3885778
-37848
lines changed

Some content is hidden

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

5,779 files changed

+3885778
-37848
lines changed

.azure-pipelines/generate-auth-module.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1'
3737
arguments: '-RepositoryName $(Repository_Name) -RepositoryApiKey $(Api_Key) -ModuleVersion $(Module_Version) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -EnableSigning'
3838
pwsh: true
39+
40+
- task: DotNetCoreCLI@2
41+
displayName: 'Run Enabled Tests'
42+
inputs:
43+
command: 'test'
44+
projects: '$(System.DefaultWorkingDirectory)/src/Authentication/Authentication.Test/*.csproj'
45+
testRunTitle: 'Run Enabled Tests'
3946

4047
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
4148
displayName: 'ESRP DLL Strong Name (Graph Auth Module)'

.azure-pipelines/generate-beta-rollup-module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
inputs:
3838
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet'
3939
FolderPath: $(MODULE_PATH)
40-
Pattern: '$(MODULE_PREFIX).psd1, $(MODULE_PREFIX).*.psd1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
40+
Pattern: '$(MODULE_PREFIX).psm1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
4141
signConfigType: inlineSignParams
4242
inlineOperation: |
4343
[

.azure-pipelines/generate-v1.0-rollup-module.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
inputs:
3838
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet'
3939
FolderPath: $(MODULE_PATH)
40-
Pattern: '$(MODULE_PREFIX).psd1, $(MODULE_PREFIX).*.psd1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
40+
Pattern: '$(MODULE_PREFIX).psm1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
4141
signConfigType: inlineSignParams
4242
inlineOperation: |
4343
[

.azure-pipelines/validate-pr-auth-module.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ jobs:
3333
filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1'
3434
arguments: '-RepositoryName $(Repository_Name) -RepositoryApiKey $(Api_Key) -ModuleVersion $(Module_Version) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build'
3535
pwsh: true
36+
37+
- task: DotNetCoreCLI@2
38+
displayName: 'Run Enabled Tests'
39+
inputs:
40+
command: 'test'
41+
projects: '$(System.DefaultWorkingDirectory)/src/Authentication/Authentication.Test/*.csproj'
42+
testRunTitle: 'Run Enabled Tests'
3643

3744
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
3845
displayName: 'Graph Client Tooling pipeline fail notification'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,6 @@ MigrationBackup/
351351

352352
# Ionide (cross platform F# VS Code tools) working folder
353353
.ionide/
354+
355+
# Visual Studio Code
356+
.vscode/

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
# Microsoft Graph PowerShell SDK (alpha)
2-
The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph.
1+
# Microsoft Graph PowerShell SDK Preview
2+
The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph.
33

4-
## Installing the Microsoft.Graph.Beta Module
4+
## Installing the Microsoft.Graph Module
55

6-
In the future, the modules will be published to the PowerShell Gallery, however in the short term they are hosted on our own nuget feed. Use the following commands to register repository and then install the `Microsoft.Graph.Beta` module from there.
6+
The modules are now published on the PowerShell Gallery. Installing is as simple as:
77

88
```ps
9-
Register-PSRepository `
10-
-Name GraphPowerShell `
11-
-SourceLocation https://graphpowershellrepository.azurewebsites.net/nuget
12-
13-
# Installing the Graph PowerShell module for the Beta API
14-
Install-module Microsoft.Graph.Beta -Repository GraphPowerShell
9+
Install-module Microsoft.Graph
1510
```
1611

17-
There are a set of samples in the `samples` folder to help getting started with the library.
12+
There are a set of samples in the `samples` folder to help getting started with the library. If you have an older version of these modules installed, there are uninstall instructions in the [InstallModule](./samples/0-InstallModule.ps1) script.
1813

1914
## Generate Module
2015

@@ -134,3 +129,12 @@ There are a set of samples in the `samples` folder to help getting started with
134129
```ps
135130
Disconnect-Graph
136131
```
132+
133+
## Troubleshooting Permission Related Errors
134+
135+
When working with various operations in the Graph, you may encounter an error such as "Insufficient privileges to complete the operation." For example, this particular error can occur when using the `New-Application` command if the appropriate permissions are not granted.
136+
137+
If permission related errors occur and the user you authenticated with in the popup has the appropriate permissions to peform the operation try these steps.
138+
139+
- You can try running `Disconnect-Graph`, then `Connect-Graph`. Then, run the code that encountered the permission issues to see if it works.
140+
- You can try running `Connect-Graph -ForceRefresh`. This will trigger a refresh of the access token in your cache. MSAL will only refresh the access token in your cache if it has expired (usually an hour), or if you explicitly refresh it via `-ForceRefresh`. Then, run the code that encountered the permission issues to see if it works.

Repo.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
<Project>
3+
<PropertyGroup>
4+
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
5+
<RepoSrc>$(RepoRoot)src/</RepoSrc>
6+
<RepoArtifacts>$(RepoRoot)artifacts/</RepoArtifacts>
7+
<RepoTools>$(RepoRoot)tools/</RepoTools>
8+
</PropertyGroup>
9+
</Project>

config/ModuleMetadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"projectUri": "https://github.com/microsoftgraph/msgraph-sdk-powershell",
99
"iconUri": "https://raw.githubusercontent.com/microsoftgraph/g-raph/master/g-raph.png",
1010
"tags": "MicrosoftGraph;Microsoft;Office365;Graph;PowerShell;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK;",
11-
"releaseNotes": "",
12-
"assemblyOriginatorKeyFile": "35MSSharedLib1024.snk"
11+
"releaseNotes": "See https://aka.ms/GraphPowerShell-Release.",
12+
"assemblyOriginatorKeyFile": "35MSSharedLib1024.snk",
13+
"version": "0.2.0"
1314
}

config/ModulesMapping.jsonc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"Analytics": "^activitystatistics\\.|^users.userAnalytics$|^users.officeGraphInsights$",
33
"Bookings": "^bookingBusinesses\\.|^bookingCurrencies\\.",
4+
"CloudCommunications": "^communications\\.",
45
"DevicesApps.MobileAppManagement": "^users.managedAppRegistration$|^users.windowsInformationProtectionDeviceRegistration$",
56
"DevicesApps.OfficeConfiguration": "^officeConfiguration\\.",
67
"DevicesApps.SharedResources": "^users.mobileAppTroubleshootingEvent$",
78
"Education": "^education\\.",
89
"Files.Drives": "^drives\\.|^drive\\.",
910
"Files.Permissions": "^groups.resourceSpecificPermissionGrant$", // Missing in docs
1011
"Files.Shares": "^shares\\.",
12+
"Financials": "^financials\\.",
1113
"Groups.Calendar": "^groups.calendar$|^groups.event$",
1214
"Groups.Conversation": "^groups.conversation$",
1315
"Groups.ConversationThread": "^groups.conversationThread$",
@@ -22,12 +24,14 @@
2224
"Groups.Planner": "^groups.plannerGroup$",
2325
"Groups.ProfilePhoto": "^groups.profilePhoto$",
2426
"Groups.Site": "^groups.site$",
25-
"Identity.AccessReview": "^accessReviews\\.|^accessReviewDecisions\\.|^businessFlowTemplates\\.|^programControlTypes\\.",
27+
"Identity.AccessReview": "^accessReviews\\.|^accessReviewDecisions\\.|^businessFlowTemplates\\.|^programControlTypes\\.|^programs\\.|^programControls\\.",
2628
"Identity.AdministrativeUnits": "^administrativeUnits\\.|^users.scopedRoleMembership$",
29+
"Identity.Application": "^applications\\.|^applicationTemplates\\.",
2730
"Identity.AppRoleAssignments": "^appRoleAssignments\\.|^users.appRoleAssignment$|^groups.appRoleAssignment$",
2831
"Identity.AuditLogs": "^auditLogs\\.",
2932
"Identity.AzureADPIM": "^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedOperationEvents\\.|^privilegedApproval\\.|^privilegedRoleAssignmentRequests\\.",
3033
"Identity.CertificateBasedAuthConfiguration": "^certificateBasedAuthConfiguration\\.",
34+
"Identity.ConditionalAccess": "^conditionalAccess\\.",
3135
"Identity.Contracts": "^contracts\\.",
3236
"Identity.DataPolicyOperations": "^dataPolicyOperations\\.",
3337
"Identity.Devices": "^devices\\.",
@@ -44,16 +48,22 @@
4448
"Identity.Organization": "^organization\\.",
4549
"Identity.OrganizationContacts": "^contacts\\.",
4650
"Identity.Policies": "^policies\\.",
47-
"Identity.Protection": "^riskDetections\\.|^riskyUsers\\.",
51+
"Identity.Protection": "^riskDetections\\.|^riskyUsers\\.|^identityRiskEvents\\.|^impossibleTravelRiskEvents\\.|^leakedCredentialsRiskEvents\\.|^anonymousIpRiskEvents\\.|^suspiciousIpRiskEvents\\.|^unfamiliarLocationRiskEvents\\.|^malwareRiskEvents\\.",
4852
"Identity.Providers": "^identityProviders\\.",
53+
"Identity.RoleManagement": "^roleManagement\\.",
54+
"Identity.ServicePrincipal": "^servicePrincipals\\.",
4955
"Identity.SubscribedSkus": "^subscribedSkus\\.",
5056
"Identity.TermsOfUse": "^agreements\\.|^agreementAcceptances\\.|^users.agreementAcceptance$",
5157
"Identity.TrustFramework": "^trustFramework\\.",
58+
"Identity.UserFlows": "^identity\\.",
5259
"Notification": "^users.notification$",
5360
"OnlineMeetings": "^users.onlineMeeting$",
5461
"Places": "^places\\.",
5562
"Planner": "^planner\\.",
63+
"Reports": "^reports\\.",
5664
"SchemaExtensions": "^schemaExtensions\\.",
65+
"Search": "^search\\.|^external\\.|^connections\\.",
66+
"Security": "^Security\\.",
5767
"Sites.Drive": "^sites.drive$",
5868
"Sites.List": "^sites.list$",
5969
"Sites.OneNote": "^sites.onenote$",
@@ -85,27 +95,20 @@
8595
"Users.ProfilePhoto": "^users.profilePhoto$",
8696
"Users.User": "^users.user$|^users.presence$",
8797
"Users.UserSettings": "^users.userSettings$",
88-
"Identity.Application": "^applications\\.|^applicationTemplates\\.",
89-
"Identity.ServicePrincipal": "^servicePrincipals\\.",
9098

9199
// Contains Duplicate Cmdlet
92100
// "Sites.Functions": "^sites.Functions$",
93101
// "Sites.Actions": "^sites.Actions$",
94102

95103
// Fails to build.
96-
// "Identity.RoleManagement": "^roleManagement\\.",
97104
// "Users.Actions": "^users.Actions$",
98-
// "Identity.Protection": "^identityRiskEvents\\.|^impossibleTravelRiskEvents\\.|^leakedCredentialsRiskEvents\\.|^anonymousIpRiskEvents\\.|^suspiciousIpRiskEvents\\.|^unfamiliarLocationRiskEvents\\.|^malwareRiskEvents\\.",
99105
// "DevicesApps.DeviceManagement": "^deviceManagement\\.|^users.deviceEnrollmentConfiguration$|^users.deviceManagementTroubleshootingEvent$|^users.managedDevice$|^users.mobileAppIntentAndState$",
100106
// "Groups.Actions": "^groups.Actions$",
101107
// "DevicesApps.DeviceAppManagement": "^deviceAppManagement\\.",
102-
// "Financials": "^financials\\.",
103-
// "Identity.AccessReview": "^programs\\.|^programControls\\.",
104-
// "Reports": "^reports\\.",
105-
// "Security": "^Security\\.",
108+
106109
// "Workbooks": "^workbooks\\.", - Too large
107110

108111
// Invalid / No longer supported
109112
// "Sites.ListItem": "^sites.baseItem$",
110113
// "OnlineMeetings": "^app\\.",
111-
}
114+
}

openApiDocs/Beta/Analytics.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
openapi: 3.0.1
22
info:
33
title: Analytics
4-
version: v1.0-Beta
4+
version: v1.0-beta
55
servers:
6-
- url: https://graph.microsoft.com/Beta/
6+
- url: https://graph.microsoft.com/beta/
77
description: Core
88
paths:
99
/activitystatistics:
@@ -1452,14 +1452,17 @@ components:
14521452
type: array
14531453
items:
14541454
$ref: '#/components/schemas/microsoft.graph.trending'
1455+
description: Calculated relationship identifying trending documents. Trending documents can be stored in OneDrive or in SharePoint sites.
14551456
shared:
14561457
type: array
14571458
items:
14581459
$ref: '#/components/schemas/microsoft.graph.sharedInsight'
1460+
description: Calculated relationship identifying documents shared with a user. Documents can be shared as email attachments or as OneDrive for Business links sent in emails.
14591461
used:
14601462
type: array
14611463
items:
14621464
$ref: '#/components/schemas/microsoft.graph.usedInsight'
1465+
description: 'Calculated relationship identifying documents viewed and modified by a user. Includes documents the user used in OneDrive for Business, SharePoint, opened as email attachments, and as link attachments from sources like Box, DropBox and Google Drive.'
14631466
example:
14641467
id: string (identifier)
14651468
trending:
@@ -1508,6 +1511,7 @@ components:
15081511
properties:
15091512
id:
15101513
type: string
1514+
description: Read-only.
15111515
example:
15121516
id: string (identifier)
15131517
microsoft.graph.trending:
@@ -1518,6 +1522,7 @@ components:
15181522
properties:
15191523
weight:
15201524
type: number
1525+
description: 'Value indicating how much the document is currently trending. The larger the number, the more the document is currently trending around the user (the more relevant it is). Returned documents are sorted by this value.'
15211526
format: double
15221527
resourceVisualization:
15231528
$ref: '#/components/schemas/microsoft.graph.resourceVisualization'
@@ -1596,13 +1601,16 @@ components:
15961601
sharedDateTime:
15971602
pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$'
15981603
type: string
1604+
description: 'The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: 2014-01-01T00:00:00Z. Read-only.'
15991605
format: date-time
16001606
nullable: true
16011607
sharingSubject:
16021608
type: string
1609+
description: The subject with which the document was shared.
16031610
nullable: true
16041611
sharingType:
16051612
type: string
1613+
description: 'Determines the way the document was shared, can be by a ''Link'', ''Attachment'', ''Group'', ''Site''.'
16061614
nullable: true
16071615
sharingReference:
16081616
$ref: '#/components/schemas/microsoft.graph.resourceReference'
@@ -1620,27 +1628,35 @@ components:
16201628
properties:
16211629
title:
16221630
type: string
1631+
description: The item's title text.
16231632
nullable: true
16241633
type:
16251634
type: string
1635+
description: The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types.
16261636
nullable: true
16271637
mediaType:
16281638
type: string
1639+
description: The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported.
16291640
nullable: true
16301641
previewImageUrl:
16311642
type: string
1643+
description: A URL leading to the preview image for the item.
16321644
nullable: true
16331645
previewText:
16341646
type: string
1647+
description: A preview text for the item.
16351648
nullable: true
16361649
containerWebUrl:
16371650
type: string
1651+
description: A path leading to the folder in which the item is stored.
16381652
nullable: true
16391653
containerDisplayName:
16401654
type: string
1655+
description: 'A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item.'
16411656
nullable: true
16421657
containerType:
16431658
type: string
1659+
description: Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness.
16441660
nullable: true
16451661
example:
16461662
title: string
@@ -1657,12 +1673,15 @@ components:
16571673
properties:
16581674
webUrl:
16591675
type: string
1676+
description: A URL leading to the referenced item.
16601677
nullable: true
16611678
id:
16621679
type: string
1680+
description: The item's unique identifier.
16631681
nullable: true
16641682
type:
16651683
type: string
1684+
description: 'A string value that can be used to classify the item, such as ''microsoft.graph.driveItem'''
16661685
nullable: true
16671686
example:
16681687
webUrl: string
@@ -1675,11 +1694,13 @@ components:
16751694
lastAccessedDateTime:
16761695
pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$'
16771696
type: string
1697+
description: 'The date and time the resource was last accessed by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: 2014-01-01T00:00:00Z. Read-only.'
16781698
format: date-time
16791699
nullable: true
16801700
lastModifiedDateTime:
16811701
pattern: '^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$'
16821702
type: string
1703+
description: 'The date and time the resource was last modified by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: 2014-01-01T00:00:00Z. Read-only.'
16831704
format: date-time
16841705
nullable: true
16851706
example:
@@ -1698,12 +1719,15 @@ components:
16981719
properties:
16991720
displayName:
17001721
type: string
1722+
description: The display name of the user who shared the item.
17011723
nullable: true
17021724
id:
17031725
type: string
1726+
description: The id of the user who shared the item.
17041727
nullable: true
17051728
address:
17061729
type: string
1730+
description: The email address of the user who shared the item.
17071731
nullable: true
17081732
example:
17091733
displayName: string

0 commit comments

Comments
 (0)