48 references to InternalMicrosoftDetectionUtilities
Microsoft.DotNet.Cli.InternalMicrosoft (48)
Internal\GitHubMembershipClient.cs (3)
117
if (!
InternalMicrosoftDetectionUtilities
.TryGetString(userDocument.RootElement, "login", out var login))
132
if (
InternalMicrosoftDetectionUtilities
.TryGetString(
174
InternalMicrosoftDetectionUtilities
.CreateExceptionFailure(
Internal\InternalMicrosoftDetectionContext.cs (2)
154
InternalMicrosoftDetectionUtilities
.CreateExceptionFailure(
181
InternalMicrosoftDetectionUtilities
.IsWsl(
InternalMicrosoftDetector.cs (5)
250
InternalMicrosoftDetectionUtilities
.NormalizeAlias(best.Result.Alias),
251
InternalMicrosoftDetectionUtilities
.NormalizeDomain(best.Result.Domain),
296
var failure =
InternalMicrosoftDetectionUtilities
.CreateExceptionFailure(
370
Alias =
InternalMicrosoftDetectionUtilities
.NormalizeAlias(entry.Alias),
371
Domain =
InternalMicrosoftDetectionUtilities
.NormalizeDomain(entry.Domain)
Providers\CopilotCliDetectionProvider.cs (2)
34
if (
InternalMicrosoftDetectionUtilities
.IsGitHubToken(value) &&
50
foreach (var token in
InternalMicrosoftDetectionUtilities
.ReadGitHubTokensFromJsonFile(path))
Providers\EnvironmentGitHubTokenDetectionProvider.cs (1)
34
if (
InternalMicrosoftDetectionUtilities
.IsGitHubToken(token))
Providers\GitHubCliDetectionProvider.cs (1)
54
return
InternalMicrosoftDetectionUtilities
.IsGitHubToken(token)
Providers\MacPlatformSsoDetectionProvider.cs (8)
99
!
InternalMicrosoftDetectionUtilities
.TryGetString(kerberosStatus, "upn", out var upn) ||
100
!
InternalMicrosoftDetectionUtilities
.TryGetString(kerberosStatus, "realm", out var realm) ||
101
!
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(realm, out var realmDomain))
108
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(
112
InternalMicrosoftDetectionUtilities
.NormalizeAlias(upn[..separator]) is { } alias)
201
if (
InternalMicrosoftDetectionUtilities
.TryGetString(root, propertyName, out var value) &&
216
InternalMicrosoftDetectionUtilities
.MicrosoftLoginHost,
219
$"/{
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId}{expectedSuffix}",
Providers\UserDnsDomainDetectionProvider.cs (6)
23
if (!
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(domain, out var corporateDomain))
30
InternalMicrosoftDetectionUtilities
.NormalizeAlias(context.GetEnvironmentVariable("USERNAME")),
59
var domain =
InternalMicrosoftDetectionUtilities
.GetEnvironmentVariableFromSetOutput(
62
return
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(domain, out var corporateDomain)
65
InternalMicrosoftDetectionUtilities
.NormalizeAlias(
66
InternalMicrosoftDetectionUtilities
.GetEnvironmentVariableFromSetOutput(
Providers\VisualStudioAccountDetectionProvider.cs (16)
56
var localAppData =
InternalMicrosoftDetectionUtilities
.GetEnvironmentVariableFromSetOutput(
119
InternalMicrosoftDetectionUtilities
.CreateExceptionFailure(
188
InternalMicrosoftDetectionUtilities
.TryGetString(properties, "IdentityProvider", out var identityProvider) &&
190
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId,
216
if (!
InternalMicrosoftDetectionUtilities
.TryGetString(properties, "IdentityProvider", out var identityProvider))
221
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId,
227
if (!
InternalMicrosoftDetectionUtilities
.TryGetString(properties, "HomeTenant", out var homeTenant))
232
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId,
238
if (!
InternalMicrosoftDetectionUtilities
.TryGetString(properties, "IdTokenPayload", out var payload))
248
!
InternalMicrosoftDetectionUtilities
.TryGetString(tokenRoot, "tid", out var tenantId) ||
250
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId,
252
!
InternalMicrosoftDetectionUtilities
.TryGetString(tokenRoot, "iss", out var issuer) ||
254
$"https://{
InternalMicrosoftDetectionUtilities
.MicrosoftLoginHost}/{
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId}/v2.0",
256
!
InternalMicrosoftDetectionUtilities
.TryGetString(tokenRoot, "preferred_username", out var username) ||
257
!
InternalMicrosoftDetectionUtilities
.TryGetMicrosoftAccountIdentity(
Providers\WorkplaceJoinDetectionProvider.cs (4)
149
InternalMicrosoftDetectionUtilities
.MicrosoftTenantId,
165
if (
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(domainValue, out var corporateDomain))
170
return
InternalMicrosoftDetectionUtilities
.TryGetCorporateDomain(
187
return
InternalMicrosoftDetectionUtilities
.TryGetMicrosoftAccountIdentity(