Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-PartnerAccessToken : Unable to find an entry point named 'GetPerAdapterInfo' in DLL 'iphlpapi.dll'. #217

Closed
cblackuk opened this issue Dec 2, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@cblackuk
Copy link
Contributor

cblackuk commented Dec 2, 2019

Steps to reproduce

If you run New-PartnerAccessToken inside Azure Automation Runbook you will get the following error. That used to work as per notes below.

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:45 - ffaf8405-dbff-4c37-b605-74b9b6e60050] MSAL 
MSAL.CoreCLR with assembly version '3.0.8.0', file version '3.0.8.0' and informational version 
'3.0.8+5db620ee347d54948b2775699985ae7a4d2bef1a'. TelemetryCorrelationId(ffaf8405-dbff-4c37-b605-74b9b6e60050)
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:45 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Using 1 scopes for acquire token by refresh token request
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:45 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com/user_impersonation
Extra Query Params Keys (space separated) - 

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:45 - ffaf8405-dbff-4c37-b605-74b9b6e60050] === 
Token Acquisition (ByRefreshTokenRequest) started:
	Cache Provided: True
	Authority Host: login.microsoftonline.com
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Resolving authority endpoints... Already resolved? - FALSE
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] Is 
Authority tenantless? - False
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Checking client info returned from the server..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Saving Token Response to cache..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Looking for scopes for the authority in the cache which intersect with https://management.azure.com/user_impersonation
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Intersecting scope entries count - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Matching entries after filtering by user - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] 
Saving RT in cache...
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46] Serializing token cache with 1 items.
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:21:46 - ffaf8405-dbff-4c37-b605-74b9b6e60050] === 
Token Acquisition finished successfully. An access token was returned with Expiration Time: 12/02/2019 20:21:45 +00:00 
===
New-PartnerAccessToken : Unable to find an entry point named 'GetPerAdapterInfo' in DLL 'iphlpapi.dll'.
At line:1800 char:24
+ ... cessToken = New-PartnerAccessToken -Credential $Credentials -Applicat ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-PartnerAccessToken], EntryPointNotFoundException
    + FullyQualifiedErrorId : 
System.EntryPointNotFoundException,Microsoft.Store.PartnerCenter.PowerShell.Commands.NewPartnerAccessToken
ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     2.0.1911.6 PartnerCenter                       {Add-PartnerCustomerCartLineItem, Add-PartnerCustomerUserRo...

Expected behavior

Return access token.

Last module that works that I have tested fine was:
"PartnerCenter" = "2.0.1909.5

In "PartnerCenter" = "2.0.1909.5 it does this:

Account            : Microsoft.Store.PartnerCenter.PowerShell.Models.Authentication.PartnerAccount
CountryCode        : GB
Environment        : Microsoft.Store.PartnerCenter.PowerShell.Models.Authentication.PartnerEnvironment
ExtendedProperties : {}
Locale             : en-GB
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:47 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] MSAL 
MSAL.CoreCLR with assembly version '3.0.8.0', file version '3.0.8.0' and informational version 
'3.0.8+5db620ee347d54948b2775699985ae7a4d2bef1a'. TelemetryCorrelationId(634805d7-4e57-4b1c-9f17-e2f26fd586f4)
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:47 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Using 1 scopes for acquire token by refresh token request
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:47 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
=== Request Data ===
Authority Provided? - True
Scopes - https://api.partnercenter.microsoft.com/user_impersonation
Extra Query Params Keys (space separated) - 

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:47 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] === 
Token Acquisition (ByRefreshTokenRequest) started:
	Cache Provided: True
	Authority Host: login.microsoftonline.com
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Resolving authority endpoints... Already resolved? - FALSE
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] Is 
Authority tenantless? - True
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Checking client info returned from the server..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Saving Token Response to cache..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Looking for scopes for the authority in the cache which intersect with 
https://api.partnercenter.microsoft.com/user_impersonation
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Intersecting scope entries count - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Matching entries after filtering by user - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] 
Saving RT in cache...
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48] Serializing token cache with 1 items.
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 634805d7-4e57-4b1c-9f17-e2f26fd586f4] === 
Token Acquisition finished successfully. An access token was returned with Expiration Time: 12/02/2019 20:23:48 +00:00 
===
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] MSAL 
MSAL.CoreCLR with assembly version '3.0.8.0', file version '3.0.8.0' and informational version 
'3.0.8+5db620ee347d54948b2775699985ae7a4d2bef1a'. TelemetryCorrelationId(9c25f4a3-206f-4569-8032-51d3f233b0d8)
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] === 
OnBehalfOfParameters ===
LoginHint provided: False
User provided: True
ForceRefresh: False

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
=== Request Data ===
Authority Provided? - True
Scopes - https://api.partnercenter.microsoft.com/user_impersonation
Extra Query Params Keys (space separated) - 

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] === 
Token Acquisition (SilentRequest) started:
	Cache Provided: True
	Authority Host: login.microsoftonline.com
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Looking up access token in the cache.
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Filtering by home account id item count before 1 after 1
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Tenant id: 9fea4606-7c07-4518-9f3e-8de9c52ab627
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Filtering by tenant id item count before 1 after 1
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Matching entry count -1
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Matching entry count after filtering by scopes - 1
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] 
Access token is not expired. Returning the found cache entry. [Current time (12/02/2019 19:23:48) - Expiration Time 
(12/02/2019 20:23:48 +00:00) - Extended Expiration Time (12/02/2019 20:23:48 +00:00)]
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:48 - 9c25f4a3-206f-4569-8032-51d3f233b0d8] === 
Token Acquisition finished successfully. An access token was returned with Expiration Time: 12/02/2019 20:23:48 +00:00 
===
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] MSAL 
MSAL.CoreCLR with assembly version '3.0.8.0', file version '3.0.8.0' and informational version 
'3.0.8+5db620ee347d54948b2775699985ae7a4d2bef1a'. TelemetryCorrelationId(a4ddb481-09af-43c4-8d49-6c9d295a8ac9)
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Using 1 scopes for acquire token by refresh token request
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com/user_impersonation
Extra Query Params Keys (space separated) - 

MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] === 
Token Acquisition (ByRefreshTokenRequest) started:
	Cache Provided: True
	Authority Host: login.microsoftonline.com
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Resolving authority endpoints... Already resolved? - FALSE
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] Is 
Authority tenantless? - False
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Checking client info returned from the server..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Saving Token Response to cache..
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Looking for scopes for the authority in the cache which intersect with https://management.azure.com/user_impersonation
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Intersecting scope entries count - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Matching entries after filtering by user - 0
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] 
Saving RT in cache...
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52] Serializing token cache with 1 items.
MSAL Info False (False) MSAL 3.0.8.0 MSAL.CoreCLR N/A [12/02/2019 19:23:52 - a4ddb481-09af-43c4-8d49-6c9d295a8ac9] === 
Token Acquisition finished successfully. An access token was returned with Expiration Time: 12/02/2019 20:23:51 +00:00 
===

ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     2.0.1909.5 PartnerCenter                       {Add-PartnerCustomerCartLineItem, Add-PartnerCustomerUserRo...

@IsaiahWilliams

@ghost ghost self-assigned this Dec 2, 2019
@ghost ghost added the bug Something isn't working label Dec 2, 2019
@ghost
Copy link

ghost commented Dec 5, 2019

@cblackuk we are preparing to release version 3.0 and it contains a fix for this issue. Our goal is to have the update available by the end of the week

@cblackuk
Copy link
Contributor Author

cblackuk commented Dec 5, 2019

That would be a godsend @IsaiahWilliams - thank you ever so much!

@ghost
Copy link

ghost commented Dec 6, 2019

@cblackuk version 3.0 has been released. Through this release a number of issues are being addressed. You can review all of the details regarding the changes here. Please let us know if you have any issues.

@ghost ghost closed this as completed Dec 6, 2019
@cblackuk
Copy link
Contributor Author

cblackuk commented Dec 6, 2019

Thanks for sorting that out @IsaiahWilliams - tested both inside runbook and docker - all works! Massive win for me! Thank you!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant