Skip to content

Commit

Permalink
Merge pull request #135 from microsoftgraph/dev
Browse files Browse the repository at this point in the history
Build and release of 0.2.0 modules
  • Loading branch information
peombwa authored Mar 13, 2020
2 parents 824ded5 + 82f8d34 commit 9daa867
Show file tree
Hide file tree
Showing 5,779 changed files with 3,885,778 additions and 37,848 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 7 additions & 0 deletions .azure-pipelines/generate-auth-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1'
arguments: '-RepositoryName $(Repository_Name) -RepositoryApiKey $(Api_Key) -ModuleVersion $(Module_Version) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build -EnableSigning'
pwsh: true

- task: DotNetCoreCLI@2
displayName: 'Run Enabled Tests'
inputs:
command: 'test'
projects: '$(System.DefaultWorkingDirectory)/src/Authentication/Authentication.Test/*.csproj'
testRunTitle: 'Run Enabled Tests'

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP DLL Strong Name (Graph Auth Module)'
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/generate-beta-rollup-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
inputs:
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet'
FolderPath: $(MODULE_PATH)
Pattern: '$(MODULE_PREFIX).psd1, $(MODULE_PREFIX).*.psd1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
Pattern: '$(MODULE_PREFIX).psm1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
signConfigType: inlineSignParams
inlineOperation: |
[
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/generate-v1.0-rollup-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
inputs:
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet'
FolderPath: $(MODULE_PATH)
Pattern: '$(MODULE_PREFIX).psd1, $(MODULE_PREFIX).*.psd1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
Pattern: '$(MODULE_PREFIX).psm1, $(MODULE_PREFIX).*.format.ps1xml, *.ps1'
signConfigType: inlineSignParams
inlineOperation: |
[
Expand Down
7 changes: 7 additions & 0 deletions .azure-pipelines/validate-pr-auth-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
filePath: '$(System.DefaultWorkingDirectory)/tools/GenerateAuthenticationModule.ps1'
arguments: '-RepositoryName $(Repository_Name) -RepositoryApiKey $(Api_Key) -ModuleVersion $(Module_Version) -ArtifactsLocation $(Build.ArtifactStagingDirectory) -Build'
pwsh: true

- task: DotNetCoreCLI@2
displayName: 'Run Enabled Tests'
inputs:
command: 'test'
projects: '$(System.DefaultWorkingDirectory)/src/Authentication/Authentication.Test/*.csproj'
testRunTitle: 'Run Enabled Tests'

- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
displayName: 'Graph Client Tooling pipeline fail notification'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,6 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Visual Studio Code
.vscode/
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# Microsoft Graph PowerShell SDK (alpha)
The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph.
# Microsoft Graph PowerShell SDK Preview
The Microsoft Graph PowerShell SDK is a collection of PowerShell modules that contain cmdlets for calling Microsoft Graph.

## Installing the Microsoft.Graph.Beta Module
## Installing the Microsoft.Graph Module

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.
The modules are now published on the PowerShell Gallery. Installing is as simple as:

```ps
Register-PSRepository `
-Name GraphPowerShell `
-SourceLocation https://graphpowershellrepository.azurewebsites.net/nuget
# Installing the Graph PowerShell module for the Beta API
Install-module Microsoft.Graph.Beta -Repository GraphPowerShell
Install-module Microsoft.Graph
```

There are a set of samples in the `samples` folder to help getting started with the library.
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.

## Generate Module

Expand Down Expand Up @@ -134,3 +129,12 @@ There are a set of samples in the `samples` folder to help getting started with
```ps
Disconnect-Graph
```
## Troubleshooting Permission Related Errors
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.
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.
- You can try running `Disconnect-Graph`, then `Connect-Graph`. Then, run the code that encountered the permission issues to see if it works.
- 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.
9 changes: 9 additions & 0 deletions Repo.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

<Project>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<RepoSrc>$(RepoRoot)src/</RepoSrc>
<RepoArtifacts>$(RepoRoot)artifacts/</RepoArtifacts>
<RepoTools>$(RepoRoot)tools/</RepoTools>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions config/ModuleMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"projectUri": "https://github.com/microsoftgraph/msgraph-sdk-powershell",
"iconUri": "https://raw.githubusercontent.com/microsoftgraph/g-raph/master/g-raph.png",
"tags": "MicrosoftGraph;Microsoft;Office365;Graph;PowerShell;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK;",
"releaseNotes": "",
"assemblyOriginatorKeyFile": "35MSSharedLib1024.snk"
"releaseNotes": "See https://aka.ms/GraphPowerShell-Release.",
"assemblyOriginatorKeyFile": "35MSSharedLib1024.snk",
"version": "0.2.0"
}
25 changes: 14 additions & 11 deletions config/ModulesMapping.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"Analytics": "^activitystatistics\\.|^users.userAnalytics$|^users.officeGraphInsights$",
"Bookings": "^bookingBusinesses\\.|^bookingCurrencies\\.",
"CloudCommunications": "^communications\\.",
"DevicesApps.MobileAppManagement": "^users.managedAppRegistration$|^users.windowsInformationProtectionDeviceRegistration$",
"DevicesApps.OfficeConfiguration": "^officeConfiguration\\.",
"DevicesApps.SharedResources": "^users.mobileAppTroubleshootingEvent$",
"Education": "^education\\.",
"Files.Drives": "^drives\\.|^drive\\.",
"Files.Permissions": "^groups.resourceSpecificPermissionGrant$", // Missing in docs
"Files.Shares": "^shares\\.",
"Financials": "^financials\\.",
"Groups.Calendar": "^groups.calendar$|^groups.event$",
"Groups.Conversation": "^groups.conversation$",
"Groups.ConversationThread": "^groups.conversationThread$",
Expand All @@ -22,12 +24,14 @@
"Groups.Planner": "^groups.plannerGroup$",
"Groups.ProfilePhoto": "^groups.profilePhoto$",
"Groups.Site": "^groups.site$",
"Identity.AccessReview": "^accessReviews\\.|^accessReviewDecisions\\.|^businessFlowTemplates\\.|^programControlTypes\\.",
"Identity.AccessReview": "^accessReviews\\.|^accessReviewDecisions\\.|^businessFlowTemplates\\.|^programControlTypes\\.|^programs\\.|^programControls\\.",
"Identity.AdministrativeUnits": "^administrativeUnits\\.|^users.scopedRoleMembership$",
"Identity.Application": "^applications\\.|^applicationTemplates\\.",
"Identity.AppRoleAssignments": "^appRoleAssignments\\.|^users.appRoleAssignment$|^groups.appRoleAssignment$",
"Identity.AuditLogs": "^auditLogs\\.",
"Identity.AzureADPIM": "^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedOperationEvents\\.|^privilegedApproval\\.|^privilegedRoleAssignmentRequests\\.",
"Identity.CertificateBasedAuthConfiguration": "^certificateBasedAuthConfiguration\\.",
"Identity.ConditionalAccess": "^conditionalAccess\\.",
"Identity.Contracts": "^contracts\\.",
"Identity.DataPolicyOperations": "^dataPolicyOperations\\.",
"Identity.Devices": "^devices\\.",
Expand All @@ -44,16 +48,22 @@
"Identity.Organization": "^organization\\.",
"Identity.OrganizationContacts": "^contacts\\.",
"Identity.Policies": "^policies\\.",
"Identity.Protection": "^riskDetections\\.|^riskyUsers\\.",
"Identity.Protection": "^riskDetections\\.|^riskyUsers\\.|^identityRiskEvents\\.|^impossibleTravelRiskEvents\\.|^leakedCredentialsRiskEvents\\.|^anonymousIpRiskEvents\\.|^suspiciousIpRiskEvents\\.|^unfamiliarLocationRiskEvents\\.|^malwareRiskEvents\\.",
"Identity.Providers": "^identityProviders\\.",
"Identity.RoleManagement": "^roleManagement\\.",
"Identity.ServicePrincipal": "^servicePrincipals\\.",
"Identity.SubscribedSkus": "^subscribedSkus\\.",
"Identity.TermsOfUse": "^agreements\\.|^agreementAcceptances\\.|^users.agreementAcceptance$",
"Identity.TrustFramework": "^trustFramework\\.",
"Identity.UserFlows": "^identity\\.",
"Notification": "^users.notification$",
"OnlineMeetings": "^users.onlineMeeting$",
"Places": "^places\\.",
"Planner": "^planner\\.",
"Reports": "^reports\\.",
"SchemaExtensions": "^schemaExtensions\\.",
"Search": "^search\\.|^external\\.|^connections\\.",
"Security": "^Security\\.",
"Sites.Drive": "^sites.drive$",
"Sites.List": "^sites.list$",
"Sites.OneNote": "^sites.onenote$",
Expand Down Expand Up @@ -85,27 +95,20 @@
"Users.ProfilePhoto": "^users.profilePhoto$",
"Users.User": "^users.user$|^users.presence$",
"Users.UserSettings": "^users.userSettings$",
"Identity.Application": "^applications\\.|^applicationTemplates\\.",
"Identity.ServicePrincipal": "^servicePrincipals\\.",

// Contains Duplicate Cmdlet
// "Sites.Functions": "^sites.Functions$",
// "Sites.Actions": "^sites.Actions$",

// Fails to build.
// "Identity.RoleManagement": "^roleManagement\\.",
// "Users.Actions": "^users.Actions$",
// "Identity.Protection": "^identityRiskEvents\\.|^impossibleTravelRiskEvents\\.|^leakedCredentialsRiskEvents\\.|^anonymousIpRiskEvents\\.|^suspiciousIpRiskEvents\\.|^unfamiliarLocationRiskEvents\\.|^malwareRiskEvents\\.",
// "DevicesApps.DeviceManagement": "^deviceManagement\\.|^users.deviceEnrollmentConfiguration$|^users.deviceManagementTroubleshootingEvent$|^users.managedDevice$|^users.mobileAppIntentAndState$",
// "Groups.Actions": "^groups.Actions$",
// "DevicesApps.DeviceAppManagement": "^deviceAppManagement\\.",
// "Financials": "^financials\\.",
// "Identity.AccessReview": "^programs\\.|^programControls\\.",
// "Reports": "^reports\\.",
// "Security": "^Security\\.",

// "Workbooks": "^workbooks\\.", - Too large

// Invalid / No longer supported
// "Sites.ListItem": "^sites.baseItem$",
// "OnlineMeetings": "^app\\.",
}
}
28 changes: 26 additions & 2 deletions openApiDocs/Beta/Analytics.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
openapi: 3.0.1
info:
title: Analytics
version: v1.0-Beta
version: v1.0-beta
servers:
- url: https://graph.microsoft.com/Beta/
- url: https://graph.microsoft.com/beta/
description: Core
paths:
/activitystatistics:
Expand Down Expand Up @@ -1452,14 +1452,17 @@ components:
type: array
items:
$ref: '#/components/schemas/microsoft.graph.trending'
description: Calculated relationship identifying trending documents. Trending documents can be stored in OneDrive or in SharePoint sites.
shared:
type: array
items:
$ref: '#/components/schemas/microsoft.graph.sharedInsight'
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.
used:
type: array
items:
$ref: '#/components/schemas/microsoft.graph.usedInsight'
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.'
example:
id: string (identifier)
trending:
Expand Down Expand Up @@ -1508,6 +1511,7 @@ components:
properties:
id:
type: string
description: Read-only.
example:
id: string (identifier)
microsoft.graph.trending:
Expand All @@ -1518,6 +1522,7 @@ components:
properties:
weight:
type: number
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.'
format: double
resourceVisualization:
$ref: '#/components/schemas/microsoft.graph.resourceVisualization'
Expand Down Expand Up @@ -1596,13 +1601,16 @@ components:
sharedDateTime:
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])$'
type: string
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.'
format: date-time
nullable: true
sharingSubject:
type: string
description: The subject with which the document was shared.
nullable: true
sharingType:
type: string
description: 'Determines the way the document was shared, can be by a ''Link'', ''Attachment'', ''Group'', ''Site''.'
nullable: true
sharingReference:
$ref: '#/components/schemas/microsoft.graph.resourceReference'
Expand All @@ -1620,27 +1628,35 @@ components:
properties:
title:
type: string
description: The item's title text.
nullable: true
type:
type: string
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.
nullable: true
mediaType:
type: string
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.
nullable: true
previewImageUrl:
type: string
description: A URL leading to the preview image for the item.
nullable: true
previewText:
type: string
description: A preview text for the item.
nullable: true
containerWebUrl:
type: string
description: A path leading to the folder in which the item is stored.
nullable: true
containerDisplayName:
type: string
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.'
nullable: true
containerType:
type: string
description: Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness.
nullable: true
example:
title: string
Expand All @@ -1657,12 +1673,15 @@ components:
properties:
webUrl:
type: string
description: A URL leading to the referenced item.
nullable: true
id:
type: string
description: The item's unique identifier.
nullable: true
type:
type: string
description: 'A string value that can be used to classify the item, such as ''microsoft.graph.driveItem'''
nullable: true
example:
webUrl: string
Expand All @@ -1675,11 +1694,13 @@ components:
lastAccessedDateTime:
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])$'
type: string
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.'
format: date-time
nullable: true
lastModifiedDateTime:
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])$'
type: string
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.'
format: date-time
nullable: true
example:
Expand All @@ -1698,12 +1719,15 @@ components:
properties:
displayName:
type: string
description: The display name of the user who shared the item.
nullable: true
id:
type: string
description: The id of the user who shared the item.
nullable: true
address:
type: string
description: The email address of the user who shared the item.
nullable: true
example:
displayName: string
Expand Down
Loading

0 comments on commit 9daa867

Please sign in to comment.