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

Get-PartnerSignInActivity issue #194

Closed
kevinbasoftcat opened this issue Nov 20, 2019 · 22 comments
Closed

Get-PartnerSignInActivity issue #194

kevinbasoftcat opened this issue Nov 20, 2019 · 22 comments
Labels
help wanted Extra attention is needed

Comments

@kevinbasoftcat
Copy link

Steps to reproduce

https://docs.microsoft.com/en-us/powershell/module/partnercenter/get-partnerusersigninactivity?view=partnercenterps-2.0

What steps can reproduce the defect?
With the latest version .4 we are now getting all user's returned when using the Get-PartnerUser however when running the second part of the sign in activity commands we are getting the below error.

Get-PartnerUserSignInActivity : Code: generalException
Message: An error occurred sending the request.
At line:1 char:31

  • ... rs.ForEach({Get-PartnerUserSignInActivity -StartDate (Get-Date).AddDa ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-PartnerUserSignInActivity], ServiceException
    • FullyQualifiedErrorId : Microsoft.Graph.ServiceException,Microsoft.Store.PartnerCenter.PowerShell.Commands.GetPartnerUserSignInActivity

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

Expected behavior

Share the expected output

Actual behavior

What is the behavior observed?

Diagnostic logs

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

Environment

Please share additional details about your environment.
Version 2.0.1911.4

@ghost
Copy link

ghost commented Nov 20, 2019

@kevinbasoftcat would you mind sharing the details on how you authenticating and actual commands you running to get this error?

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Nov 20, 2019 via email

@ghost
Copy link

ghost commented Nov 20, 2019

@kevinbasoftcat thank you for the quick response. Just to confirm you are running Connect-PartnerCenter without any parameters when connecting correct?

If that is the case, then this issue for certain is not caused by authentication. Which means that Microsoft Graph is throwing an error in your circumstance, that is not being handled. To help isolate this error would you be able to run Fiddler to capture the request and full error when making this request?

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Nov 20, 2019 via email

@ghost
Copy link

ghost commented Nov 20, 2019

@kevinbasoftcat thank you for helping troubleshoot this, and smart thinking on using a virtual machine. There should not be an impact of you doing operations in the background, but it will be interesting to see what you discover.

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Nov 20, 2019 via email

@ghost
Copy link

ghost commented Nov 20, 2019

Hi @kevinbasoftcat, thank you for you helping with this. It does not look like the attachment came through. Can you email it to isaiah.williams@microsoft.com?

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Nov 20, 2019 via email

@ghost ghost mentioned this issue Nov 22, 2019
@ghost
Copy link

ghost commented Nov 22, 2019

@kevinbasoftcat I just released version 2.0.1911.5 that contains a handful of enhancements. When you get an opportunity can you update to this version and try again?

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Nov 25, 2019 via email

@ghost
Copy link

ghost commented Nov 26, 2019

@kevinbasoftcat I having issue accessing the link you shared. Would it be possible for you to email the zip file to isaiah.williams@microsoft.com?

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

ghost commented Dec 8, 2019

@kevinbasoftcat thank you for sharing the details with me. I have been digging into this further and discovered what I believe to be the root cause for the issue. The required code changes have been made and the hope is to have an update available through the PowerShell gallery before the end of the year.

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Dec 9, 2019 via email

@ghost ghost mentioned this issue Dec 10, 2019
@ghost
Copy link

ghost commented Dec 11, 2019

@kevinbasoftcat version 3.0.1 of the module has been released. It includes a handful of enhancements that should resolve the root cause of this issue. Would you be able to update and try the following?

  1. Run the command as you have been. I am interested to know if you are still encountering the thread pool starvation issue
  2. If you encounter issues with the above restart the machine and try the details documented below
  3. Run the following command
Get-PartnerUserSignInActivity -StartDate (Get-Date).AddDays(-7)

Thank you for helping us test and validate everything is working as excepted.

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Dec 12, 2019 via email

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Dec 12, 2019 via email

@ghost
Copy link

ghost commented Dec 18, 2019

@kevinbasoftcat I have good news, the root cause for this issue has been identified. Through issue #230 I was able to isolated what was happening. Currently I am trying to wrap up the solution needed to resolve this issue

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Dec 18, 2019 via email

@ghost
Copy link

ghost commented Dec 19, 2019

@kevinbasoftcat version 3.0.2 was just released. The only change included in that release was an update that addressed the root cause of this issue. Before I close this issue I was hoping that you could test to verify that everything is working as expected for you.

@kevinbasoftcat
Copy link
Author

kevinbasoftcat commented Dec 20, 2019 via email

@ghost
Copy link

ghost commented Dec 20, 2019

@kevinbasoftcat this is particular interesting question because it will depend on a number of factors. This type of result could be due to one of the following scenarios

  1. Your integration has not perform any operations in the last seven days
  2. Your integration is leveraging a persistent token cache, which the token is being updated when expired instead of regenerated. This type of event is not available through the sign-in activities
  3. Your integration is leveraging the Secure Application Model, which is similar to behavior described in scenario two
  4. Your integration is leveraging app-only authentication (this is where a client identifier and secret key are used to get an access token), this type authentication is not captured in the sign-in activity logs.

If you the above scenarios do not apply to your integration, then it would be worth looking at the sign-in activities in Azure AD for the an account you know that is being used. That way you can verify that there is not an issue.

@ghost ghost added help wanted Extra attention is needed and removed bug Something isn't working labels Dec 20, 2019
@ghost
Copy link

ghost commented Dec 22, 2019

If you have further concerns or issues please let us know.

@ghost ghost closed this as completed Dec 22, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant