Skip to content

Commit b8eb6ca

Browse files
authored
Merge branch 'dev' into po/AddNewGroupMember
2 parents e78de94 + 963ab93 commit b8eb6ca

File tree

130 files changed

+1462
-261
lines changed

Some content is hidden

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

130 files changed

+1462
-261
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": "Initial release of Microsoft.Graph module.",
12+
"assemblyOriginatorKeyFile": "35MSSharedLib1024.snk",
13+
"version": "0.2.0"
1314
}

samples/0-InstallModule.ps1

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Installing the Module
22

3-
# Temporarily, register this repository
4-
Register-PSRepository `
5-
-Name GraphPowerShell `
6-
-SourceLocation https://graphpowershellrepository.azurewebsites.net/nuget
3+
# Installing the Graph PowerShell module for the Beta API with no previous versions installed
4+
Install-module Microsoft.Graph
5+
6+
# Uninstalling the old preview version, before installing the new
7+
8+
# Remove the main meta module
9+
Uninstall-Module Microsoft.Graph.Beta
10+
11+
# Remove all the dependent modules
12+
Get-InstalledModule Microsoft.Graph.Beta.* | uninstall-module
13+
14+
# Update the authentication module from 0.1.4 to 0.1.5
15+
Install-Module Microsoft.Graph.Authentication -Repository PSGallery -force
716

8-
# Installing the Graph PowerShell module for the Beta API
9-
Install-module Microsoft.Graph.Beta -Repository GraphPowerShell

samples/1-FindCommands.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
# Modules Current Available
3-
Find-Module -Repository GraphPowerShell | Select-Object Name
3+
Find-module Microsoft.Graph* | Select-Object Name
44

55
# Commands Available for licenses
6-
Get-Command -Module Microsoft.Graph.Beta* *license*
6+
Get-Command -Module Microsoft.Graph* *license*
77

88
# Commands Available for Outlook tasks
9-
Get-Command -Module Microsoft.Graph.Beta* *OutlookTask*
9+
Get-Command -Module Microsoft.Graph* *OutlookTask*
1010

1111
# Commands Available for Teams
12-
Get-Command -Module Microsoft.Graph.Beta* *Team*
12+
Get-Command -Module Microsoft.Graph* *Team*

0 commit comments

Comments
 (0)