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

Hang while using "check permissions" feature #78

Closed
Yvand opened this issue Feb 7, 2020 · 1 comment
Closed

Hang while using "check permissions" feature #78

Yvand opened this issue Feb 7, 2020 · 1 comment
Assignees
Milestone

Comments

@Yvand
Copy link
Owner

Yvand commented Feb 7, 2020

In some scenario, AzureCP hangs while using "check permissions" feature.
So far I could reproduce it only in SharePoint 2019 in a multi-server farm, in the w3wp of a site while using "check permissions" feature.

@Yvand Yvand added the bug label Feb 7, 2020
@Yvand Yvand added this to the Version 16 milestone Feb 7, 2020
@Yvand Yvand self-assigned this Feb 7, 2020
@Yvand
Copy link
Owner Author

Yvand commented Feb 7, 2020

In AzureCP.GetGroupMembershipFromAzureADAsync(), await on tasks somehow causes the hang:

IGraphServiceUsersCollectionPage userResult = await tenant.GraphService.Users.Request().Filter(filter).GetAsync().ConfigureAwait(false);

This is somehow caused by the way ASP.NET runs async tasks.
Workaround found: instead of awaiting on the async task directly, run it in a parent task, and await on the parent task:

IGraphServiceUsersCollectionPage userResult = await Task.Run(() => tenant.GraphService.Users.Request().Filter(filter).GetAsync()).ConfigureAwait(false);

Yvand added a commit that referenced this issue Feb 7, 2020
Yvand added a commit that referenced this issue Mar 17, 2020
* Update NuGet packages

* Fix hang - bug #78

* Update CHANGELOG.md

* Update DevOps pipelines

* Update AzureCP.cs

* Include all String properties of class User in enum type AzureADObjectProperty

#77: Include all other String properties of class User in enum type AzureADObjectProperty - https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties

* Update ci-compile.yml

* Test using matrix strategy

* Update ci-run-integration-tests.yml

* Update ci-run-integration-tests.yml

* Update ci-run-integration-tests.yml

* Update ci-run-integration-tests.yml

* Update admin pages

* Implement certificate-based authentication (#80)

* Add support for client certificate authentication

* Improve logging

* Updating admin pages to support client certificate

* Update admin page to support certificate authentication

* Add method AzureCPConfig.GetAzureTenantByName()

* Add methods AzureTenant.UpdateCredentials and AzureTenant.SetCredentials

* Test a fix of potential typo

* Update CHANGELOG.md
@Yvand Yvand closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant