Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Receive 'No account or login hint was passed to the AcquireTokenSilent call.' at Connect-PartnerCenter on Ubuntu #391

Open
shoootyou opened this issue Mar 1, 2022 · 0 comments

Comments

@shoootyou
Copy link

Steps to reproduce

What steps can reproduce the defect?

  • Install PowerShell Core 7.2
  • Install PartnerCenter Module
  • Execute Connect-PartnerCenter -UseDeviceAuthentication

Please share the setup, commandline for vstest.console, sample project, target
framework etc.

  • Distributor ID: Ubuntu
  • Description: Ubuntu 18.04.6 LTS
  • Release: 18.04
  • Codename: bionic

Expected behavior

Connected to Partner Center and return the current account and tenant

Actual behavior

Return the message: Connect-PartnerCenter: No account or login hint was passed to the AcquireTokenSilent call.

Diagnostic logs

Please share test platform diagnostics logs.
The logs may contain test assembly paths, kindly review and mask those before sharing.

On PowerShell Core on Ubuntu:

DEBUG: Registering the persistent token cache.
DEBUG: Registering the persistent token cache.
DEBUG: [DeviceCodeAuthenticator] Calling AcquireTokenWithDeviceCode - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation'
DEBUG: [DeviceCodeAuthenticator] Calling AcquireTokenWithDeviceCode - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation'
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:25 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) MSAL MSAL.CoreCLR with assembly version '4.8.1.0'. CorrelationId(4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10)
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:25 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0)
=== Request Data ===
Authority Provided? - True
Scopes - https://api.partnercenter.microsoft.com/user_impersonation
Extra Query Params Keys (space separated) -

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:25 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) === Token Acquisition (DeviceCodeRequest) started:

        Authority Host: login.microsoftonline.com
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:25 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Resolving authority endpoints... Already resolved? - TRUE
WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code FF5EN9UEV to authenticate.

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:26 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:26 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:26 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:32 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:32 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:32 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:37 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:37 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:37 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Checking client info returned from the server..
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Saving Token Response to cache..
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Looking for scopes for the authority in the cache which intersect with https://api.partnercenter.microsoft.com/user_impersonation
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Intersecting scope entries count - 0
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Matching entries after filtering by user - 0
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) Saving RT in cache...
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43] (UnknownClient: 0.0.0.0) Not writing FRT in ADAL legacy cache
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:11:43 - 4cfbb4cc-a7de-4aa1-9e0c-b8227c22cf10] (UnknownClient: 0.0.0.0) === Token Acquisition finished successfully. An access token was returned with Expiration Time: 03/01/2022 20:34:38 +00:00 ===
DEBUG: Registering the persistent token cache.
DEBUG: Registering the persistent token cache.
DEBUG: [SilentAuthenticator] Calling GetAccountsAsync
DEBUG: [SilentAuthenticator] Calling GetAccountsAsync
DEBUG: [SilentAuthenticator] Calling AcquireTokenSilent - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation', UserId: 'd7320306-83c3-44ce-b595-f2030d943140', Number of accounts: '0'
DEBUG: [SilentAuthenticator] Calling AcquireTokenSilent - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation', UserId: 'd7320306-83c3-44ce-b595-f2030d943140', Number of accounts: '0'
Connect-PartnerCenter: No account or login hint was passed to the AcquireTokenSilent call.

On Windows with PowerShell Core:

DEBUG: Registering the persistent token cache.
DEBUG: [DeviceCodeAuthenticator] Calling AcquireTokenWithDeviceCode - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation'
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:31 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) MSAL MSAL.CoreCLR with assembly version '4.8.1.0'. CorrelationId(4eff93dd-33bf-4e82-b513-1ed4f1919aa9)
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:31 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0)
=== Request Data ===
Authority Provided? - True
Scopes - https://api.partnercenter.microsoft.com/user_impersonation
Extra Query Params Keys (space separated) -

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:31 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) === Token Acquisition (DeviceCodeRequest) started:

        Authority Host: login.microsoftonline.com
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:31 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Resolving authority endpoints... Already resolved? - TRUE
WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code RW2YECK9C to authenticate.

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:32 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:32 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:32 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4eff93dd-33bf-4e82-b513-1ed4f1919aa9

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:38 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:38 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:38 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4eff93dd-33bf-4e82-b513-1ed4f1919aa9

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:43 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Response status code does not indicate success: 400 (BadRequest).
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:43 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) HttpStatusCode: 400: BadRequest
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:43 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Exception type: Microsoft.Identity.Client.MsalServiceException
, ErrorCode: authorization_pending
HTTP StatusCode 400
CorrelationId 4eff93dd-33bf-4e82-b513-1ed4f1919aa9

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Checking client info returned from the server..
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Saving Token Response to cache..
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Looking for scopes for the authority in the cache which intersect with https://api.partnercenter.microsoft.com/user_impersonation
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Intersecting scope entries count - 1
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Matching entries after filtering by user - 1
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) Saving RT in cache...
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49] (UnknownClient: 0.0.0.0) Not writing FRT in ADAL legacy cache
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - 4eff93dd-33bf-4e82-b513-1ed4f1919aa9] (UnknownClient: 0.0.0.0) === Token Acquisition finished successfully. An access token was returned with Expiration Time: 03/01/2022 20:19:35 +00:00 ===
DEBUG: Registering the persistent token cache.
DEBUG: [SilentAuthenticator] Calling GetAccountsAsync
DEBUG: [SilentAuthenticator] Calling AcquireTokenSilent - Scopes: 'https://api.partnercenter.microsoft.com/user_impersonation', UserId: 'd7320306-83c3-44ce-b595-f2030d943140', Number of accounts: '1'
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) MSAL MSAL.CoreCLR with assembly version '4.8.1.0'. CorrelationId(bf43cbbc-d832-4e25-80fd-463c4c6cacc2)
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) === OnBehalfOfParameters ===
LoginHint provided: False
User provided: True
ForceRefresh: False

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0)
=== Request Data ===
Authority Provided? - True
Scopes - https://api.partnercenter.microsoft.com/user_impersonation
Extra Query Params Keys (space separated) -

DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) === Token Acquisition (SilentRequest) started:

        Authority Host: login.microsoftonline.com
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Looking up access token in the cache.
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Filtering by tenant id item count before 12 after 7
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Filtering by home account id item count before 7 after 7
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Filtering by token type item count before 7 after 7
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Matching entry count - 7
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Filtering by scopes item count before 7 after 1
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Access token is not expired. Returning the found cache entry. [Current time (03/01/2022 19:10:49) - Expiration Time (03/01/2022 20:19:35 +00:00) - Extended Expiration Time (03/01/2022 20:19:35 +00:00)]
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) Returning access token found in cache. RefreshOn exists ? False
DEBUG: [MSAL] Info (False) MSAL 4.8.1.0 MSAL.CoreCLR N/A [03/01/2022 19:10:49 - bf43cbbc-d832-4e25-80fd-463c4c6cacc2] (UnknownClient: 0.0.0.0) === Token Acquisition finished successfully. An access token was returned with Expiration Time: 03/01/2022 20:19:35 +00:00 ===
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET

Absolute Uri:
https://api.partnercenter.microsoft.com/v1/profiles/organization

Headers:
Accept                        : application/json
MS-PartnerCenter-Client       : Partner Center PowerShell
MS-CorrelationId              : f06447b9-c712-40eb-bcb1-911942f4ade6
X-Locale                      : en-US
MS-RequestId                  : 32946f9f-7556-4945-b102-712ee51feb61
MS-SdkVersion                 : 1.15.6.0

DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK

Headers:
MS-CorrelationId              : f06447b9-c712-40eb-bcb1-911942f4ade6
MS-RequestId                  : 32946f9f-7556-4945-b102-712ee51feb61
MS-CV                         : CH43AAfDzE+kokoo.0
MS-ServerId                   : 000007
X-ServiceFabricRequestId      : 441294d0-fc04-4064-ac96-f94af5d50f75
Request-Context               : appId=cid-v1:03ce8ca8-8373-4021-8f25-d5dd45c7b12f
Date                          : Tue, 01 Mar 2022 19:10:51 GMT

Body:
Tenant Information


Account                                  Environment                                                                         TenantId
-------                                  -----------                                                                         --------
XXXXXXXXXXXX     AzureCloud                                                                          XXXXXXXXXXXX

Environment

Please share additional details about your environment.

  • PartnerCenter Module version: 3.0.10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant