Skip to content

Commit 9399213

Browse files
authored
Merge pull request #521 from microsoftgraph/po/ConnectMgGraphSilentFailureFix
Bump Auth to 1.3.0
2 parents 0620ca5 + 87f0d53 commit 9399213

10 files changed

+23
-9
lines changed

src/Authentication/Authentication/Cmdlets/ConnectMgGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected override void ProcessRecord()
125125
foreach (var innerException in aggregateException.Flatten().InnerExceptions)
126126
{
127127
var errorRecords = innerException.Data;
128-
if (errorRecords.Count < 1)
128+
if (errorRecords.Count > 1)
129129
{
130130
foreach (DictionaryEntry dictionaryEntry in errorRecords)
131131
{

src/Authentication/Authentication/Cmdlets/InvokeMgGraphRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ protected override void ProcessRecord()
12051205
foreach (var innerException in aggregateException.Flatten().InnerExceptions)
12061206
{
12071207
var errorRecords = innerException.Data;
1208-
if (errorRecords.Count < 1)
1208+
if (errorRecords.Count > 1)
12091209
{
12101210
foreach (DictionaryEntry dictionaryEntry in errorRecords)
12111211
{

src/Authentication/Authentication/Microsoft.Graph.Authentication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.2.0</Version>
3+
<Version>1.3.0</Version>
44
<LangVersion>7.1</LangVersion>
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<OutputType>Library</OutputType>

src/Authentication/Authentication/Microsoft.Graph.Authentication.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<metadata>
4-
<version>1.2.0</version>
4+
<version>1.3.0</version>
55
<id>Microsoft.Graph.Authentication</id>
66
<description>Microsoft Graph PowerShell authentication module</description>
77
<authors>Microsoft</authors>

src/Authentication/Authentication/Microsoft.Graph.Authentication.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft
55
#
6-
# Generated on: 23-Jan-21
6+
# Generated on: 1/27/2021
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
RootModule = './Microsoft.Graph.Authentication.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.2.0'
15+
ModuleVersion = '1.3.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BeforeAll {
2+
$ModuleName = "Microsoft.Graph.Authentication"
3+
$ModulePath = Join-Path $PSScriptRoot "..\$ModuleName.psd1"
4+
Import-Module $ModulePath -Force
5+
}
6+
Describe 'Connect-MgGraph In Delegated Mode' {
7+
It 'ShouldThrowExceptionWhenInvalidTenantIdIsSpecified' {
8+
{ Connect-MgGraph -TenantId "thisdomaindoesnotexist.com" -Scopes 'User.Read.All' -ErrorAction Stop } | Should -Throw -ExpectedMessage "*Tenant 'thisdomaindoesnotexist.com' not found*"
9+
}
10+
11+
It 'ShouldThrowExceptionWhenInvalidScopeIsSpecified' {
12+
{ Connect-MgGraph -Scopes 'User.Read.XYZ' -ErrorAction Stop } | Should -Throw -ExpectedMessage "*The scope 'User.Read.XYZ offline_access profile openid' does not exist*"
13+
}
14+
}

src/Financials/Financials/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ directive:
5757
### Versioning
5858
5959
``` yaml
60-
module-version: 1.2.0
60+
module-version: 1.3.0
6161
release-notes: See https://aka.ms/GraphPowerShell-Release.
6262
```

src/Notes/Notes/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ directive:
4444
### Versioning
4545
4646
``` yaml
47-
module-version: 1.2.0
47+
module-version: 1.3.0
4848
release-notes: See https://aka.ms/GraphPowerShell-Release.
4949
```

tools/GenerateModules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ $ModulesToGenerate | ForEach-Object -ThrottleLimit $ModulesToGenerate.Count -Par
127127

128128
try {
129129
# Generate PowerShell modules.
130-
& autorest --module-version:$ModuleVersion --service-name:$ModuleName $ModuleLevelReadMePath --verbose
130+
& autorest --module-version:$ModuleVersion --service-name:$ModuleName $ModuleLevelReadMePath --version:"3.0.6306" --verbose
131131
if ($LASTEXITCODE) {
132132
Write-Error "Failed to generate '$ModuleName' module."
133133
}

0 commit comments

Comments
 (0)