Skip to content

Commit 1cc6066

Browse files
authored
Merge branch 'dev' into 2280-get-mggroup-filter-with-special-characters-doesnt-work
2 parents 754cbe4 + 42d4aae commit 1cc6066

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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;

0 commit comments

Comments
 (0)