Skip to content

Commit b63395f

Browse files
Updating docs
1 parent 86a24d7 commit b63395f

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
<LangVersion>9.0</LangVersion>
55
<TargetFrameworks>netstandard2.0;net8.0;net472</TargetFrameworks>
66
<RootNamespace>Microsoft.Graph.PowerShell.Authentication.Core</RootNamespace>
7-
<Version>2.12.0</Version>
7+
<Version>2.25.0</Version>
8+
<!-- Suppress .NET Target Framework Moniker (TFM) Support Build Warnings -->
9+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
810
</PropertyGroup>
911
<PropertyGroup>
1012
<EnableNETAnalyzers>true</EnableNETAnalyzers>
1113
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1214
</PropertyGroup>
1315
<ItemGroup>
1416
<PackageReference Include="Azure.Core.Experimental" Version="0.1.0-preview.34" />
15-
<PackageReference Include="Azure.Identity" Version="1.13.0-beta.1" />
16-
<PackageReference Include="Azure.Identity.Broker" Version="1.2.0-beta.1" />
17-
<PackageReference Include="Microsoft.Graph.Core" Version="3.1.14" />
18-
<PackageReference Include="Microsoft.Identity.Client" Version="4.62.0" />
19-
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.62.0" />
17+
<PackageReference Include="Azure.Identity" Version="1.13.2" />
18+
<PackageReference Include="Azure.Identity.Broker" Version="1.2.0" />
19+
<PackageReference Include="Microsoft.Graph.Core" Version="3.2.2" />
20+
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.2" />
21+
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.67.2" />
2022
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2123
<PackageReference Include="System.Text.Json" Version="8.0.5" />
2224
</ItemGroup>

src/Authentication/Authentication/Helpers/HttpHelpers.cs

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ private static HttpClient GetGraphHttpClient(AzureIdentityAccessTokenProvider au
5454
new NationalCloudHandler(),
5555
new ODataQueryOptionsHandler(),
5656
new HttpVersionHandler(),
57-
//new CompressionHandler(),
5857
new RetryHandler(new RetryHandlerOption{
5958
Delay = requestContext.RetryDelay,
6059
MaxRetry = requestContext.MaxRetry,

src/Authentication/Authentication/test/Connect-MgGraph.Tests.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ Describe 'Connect-MgGraph In Delegated Mode' {
6969

7070
Describe 'Connect-MgGraph In Environment Variable Mode' {
7171
It 'Should throw exception when supported environment variables are not specified' {
72-
{ Connect-MgGraph -EnvironmentVariable -ErrorAction Stop } | Should -Throw -ExpectedMessage "*EnvironmentCredential authentication unavailable*"
72+
{ Connect-MgGraph -EnvironmentVariable -ErrorAction Stop } | Should -Throw -ExpectedMessage "*EnvironmentCredential authentication unavailable. Environment variables are not fully configured*"
7373
}
7474
It 'Should attempt to use configured environment variables' {
7575
{
7676
$Env:AZURE_CLIENT_ID = "Not_Valid"
7777
$Env:AZURE_CLIENT_SECRET = "Not_Valid"
7878
$Env:AZURE_TENANT_ID = "common"
7979
Connect-MgGraph -EnvironmentVariable -ErrorAction Stop
80-
} | Should -Throw -ExpectedMessage "*ClientSecretCredential authentication failed*"
80+
} | Should -Throw -ExpectedMessage "ClientSecretCredential authentication failed: "
8181
}
8282
}
8383

@@ -95,7 +95,7 @@ Describe 'Connect-MgGraph In App Mode' {
9595
Describe 'Connect-MgGraph Dependency Resolution' {
9696
It 'Should load Mg module side by side with Az module.' {
9797
{ Connect-AzAccount -ApplicationId $RandomClientId -CertificateThumbprint "Invalid" -Tenant "Invalid" -ErrorAction Stop } | Should -Throw -ExpectedMessage "*Could not find tenant id*"
98-
{ Connect-MgGraph -TenantId "thisdomaindoesnotexist.com" -ErrorAction Stop -UseDeviceAuthentication } | Should -Throw -ExpectedMessage "*DeviceCodeCredential authentication failed*"
98+
{ Connect-MgGraph -TenantId "thisdomaindoesnotexist.com" -ErrorAction Stop -UseDeviceAuthentication } | Should -Throw -ExpectedMessage "DeviceCodeCredential authentication failed: "
9999
}
100100
}
101101

src/Authentication/docs/Connect-MgGraph.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,38 @@ Microsoft Graph PowerShell supports two types of authentication: delegated and a
1616
```
1717
Connect-MgGraph [[-Scopes] <String[]>] [[-ClientId] <String>] [-TenantId <String>]
1818
[-ContextScope <ContextScope>] [-Environment <String>] [-UseDeviceCode] [-ClientTimeout <Double>] [-NoWelcome]
19-
[-ProgressAction <ActionPreference>] [<CommonParameters>]
19+
[<CommonParameters>]
2020
```
2121

2222
### AppCertificateParameterSet
2323
```
2424
Connect-MgGraph [-ClientId] <String> [[-CertificateSubjectName] <String>] [[-CertificateThumbprint] <String>]
25-
[-SendCertificateChain <Boolean>] [-Certificate <X509Certificate2>] [-TenantId <String>]
26-
[-ContextScope <ContextScope>] [-Environment <String>] [-ClientTimeout <Double>] [-NoWelcome]
27-
[-ProgressAction <ActionPreference>] [<CommonParameters>]
25+
[-Certificate <X509Certificate2>] [-TenantId <String>] [-ContextScope <ContextScope>] [-Environment <String>]
26+
[-ClientTimeout <Double>] [-NoWelcome] [<CommonParameters>]
2827
```
2928

3029
### IdentityParameterSet
3130
```
3231
Connect-MgGraph [[-ClientId] <String>] [-ContextScope <ContextScope>] [-Environment <String>]
33-
[-ClientTimeout <Double>] [-Identity] [-NoWelcome] [-ProgressAction <ActionPreference>] [<CommonParameters>]
32+
[-ClientTimeout <Double>] [-Identity] [-NoWelcome] [<CommonParameters>]
3433
```
3534

3635
### AppSecretCredentialParameterSet
3736
```
3837
Connect-MgGraph [-ClientSecretCredential <PSCredential>] [-TenantId <String>] [-ContextScope <ContextScope>]
39-
[-Environment <String>] [-ClientTimeout <Double>] [-NoWelcome] [-ProgressAction <ActionPreference>]
40-
[<CommonParameters>]
38+
[-Environment <String>] [-ClientTimeout <Double>] [-NoWelcome] [<CommonParameters>]
4139
```
4240

4341
### AccessTokenParameterSet
4442
```
4543
Connect-MgGraph [-AccessToken] <SecureString> [-Environment <String>] [-ClientTimeout <Double>] [-NoWelcome]
46-
[-ProgressAction <ActionPreference>] [<CommonParameters>]
44+
[<CommonParameters>]
4745
```
4846

4947
### EnvironmentVariableParameterSet
5048
```
5149
Connect-MgGraph [-ContextScope <ContextScope>] [-Environment <String>] [-ClientTimeout <Double>]
52-
[-EnvironmentVariable] [-NoWelcome] [-ProgressAction <ActionPreference>] [<CommonParameters>]
50+
[-EnvironmentVariable] [-NoWelcome] [<CommonParameters>]
5351
```
5452

5553
## DESCRIPTION

0 commit comments

Comments
 (0)