Skip to content

Commit 42d4aae

Browse files
authored
Merge pull request #2396 from microsoftgraph/azure-identity-rollback
Updates Azure.Identity and Azure.Identity.Broker package references to fix interactive browser credentials error
2 parents bf9d701 + 7570e8f commit 42d4aae

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1212
</PropertyGroup>
1313
<ItemGroup>
14-
<PackageReference Include="Azure.Identity" Version="1.10.2" />
15-
<PackageReference Include="Azure.Identity.BrokeredAuthentication" Version="1.0.0-beta.3" />
14+
<PackageReference Include="Azure.Identity" Version="1.10.3" />
15+
<PackageReference Include="Azure.Identity.Broker" Version="1.0.0-beta.5" />
1616
<PackageReference Include="Microsoft.Graph.Core" Version="3.0.9" />
1717
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
1818
</ItemGroup>

src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Azure.Core;
55
using Azure.Core.Diagnostics;
66
using Azure.Identity;
7-
using Azure.Identity.BrokeredAuthentication;
7+
using Azure.Identity.Broker;
88
using Microsoft.Graph.Authentication;
99
using Microsoft.Graph.PowerShell.Authentication.Core.Extensions;
1010
using Microsoft.Identity.Client;
@@ -133,7 +133,11 @@ private static async Task<InteractiveBrowserCredential> GetInteractiveBrowserCre
133133
}
134134
else
135135
{
136-
authRecord = await interactiveBrowserCredential.AuthenticateAsync(new TokenRequestContext(authContext.Scopes), cancellationToken).ConfigureAwait(false);
136+
authRecord = await Task.Run(() =>
137+
{
138+
// Run the thread in MTA.
139+
return interactiveBrowserCredential.AuthenticateAsync(new TokenRequestContext(authContext.Scopes), cancellationToken);
140+
});
137141
}
138142
await WriteAuthRecordAsync(authRecord).ConfigureAwait(false);
139143
return interactiveBrowserCredential;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<!-- Copy framework dependent assemblies to respective framework directory. -->
3030
<!-- Shared -->
3131
<file src="artifacts\Dependencies\Azure.Identity.dll" target="Dependencies" />
32-
<file src="artifacts\Dependencies\Azure.Identity.BrokeredAuthentication.dll" target="Dependencies" />
32+
<file src="artifacts\Dependencies\Azure.Identity.Broker.dll" target="Dependencies" />
3333
<file src="artifacts\Dependencies\Microsoft.Identity.Client.Broker.dll" target="Dependencies" />
3434
<file src="artifacts\Dependencies\Microsoft.Identity.Client.NativeInterop.dll" target="Dependencies" />
3535
<file src="artifacts\Dependencies\Microsoft.Bcl.AsyncInterfaces.dll" target="Dependencies" />

0 commit comments

Comments
 (0)