Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Fix for Azure Runbook issue #2735

Merged
merged 14 commits into from
Jul 13, 2020
Merged

Fix for Azure Runbook issue #2735

merged 14 commits into from
Jul 13, 2020

Conversation

KoenZomers
Copy link
Collaborator

@KoenZomers KoenZomers commented Jun 15, 2020

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Issue #2726

What is in this Pull Request ?

Updated MSAL to latest version and forced reference to .NET Standard compiled version due to issue with Azure Runbooks not working with PnP Graph cmdlets. Issue can be tracked down to statistical code inside MSAL which in the .NET 4.5 build tries to get the machine IP address:
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/cdf467b091e0b371deeda99861b5c01a928c504b/src/client/Microsoft.Identity.Client/Platforms/net45/NetDesktopPlatformProxy.cs#L214
which does not work in an Azure Runbook and will fail with:

Unable to find an entry point named 'GetPerAdapterInfo' in DLL 'iphlpapi.dll'

Fixed in MSAL through PR AzureAD/microsoft-authentication-library-for-dotnet#1891
Awaiting a new release of MSAL in which this fix is included. In the meantime used a custom compiled build in to get this fixed.

Issue was introduced with this update of PnP PowerShell referencing a new MSAL library on April 1:
e7b2ce9#diff-6c05e73f37aa7d4c0e28014e8985d8c7

A temporary SharePointPnPPowerShellOnline version in which this issue has been resolved is available from here:
SharePointPnPPowerShellOnline.zip

Big thanks to @robinmeure for helping getting to the bottom of this!

…compiled version due to issue with Azure Runbooks not working otherwise
@KoenZomers KoenZomers added the status:checked and ready for merge ✔ PR has been checked and is ready for merge label Jun 15, 2020
@KoenZomers KoenZomers marked this pull request as draft June 16, 2020 15:48
@KoenZomers KoenZomers added status:tracked Triaged and are being investigated further and removed status:checked and ready for merge ✔ PR has been checked and is ready for merge labels Jun 16, 2020
@KoenZomers
Copy link
Collaborator Author

KoenZomers commented Jun 16, 2020

Pulling it back intro draft as I found out this change breaks the Initialize-PnPPowerShellAuthentication cmdlet.

@KoenZomers
Copy link
Collaborator Author

Submitted PR AzureAD/microsoft-authentication-library-for-dotnet#1891 in MSAL hoping to get this fixed there. If they won't allow the fix, we will have to deviate from MSAL and use our own build of MSAL from now on, which would be really unfortunate.

@KoenZomers KoenZomers changed the title Updated MSAL to latest version and forced reference to .NET Standard Fix for Azure Runbook issue Jun 16, 2020
@KoenZomers
Copy link
Collaborator Author

Making this PR available again. It now uses a custom built MSAL. If the PR for MSAL to fix this gets accepted, I will update this PR if it hasn't been merged yet or if it has, will create a new PR to switch from the custom built MSAL library to the official one again. This way we at least can ensure it's fixed in the next release, one way or another.

@KoenZomers KoenZomers marked this pull request as ready for review June 18, 2020 07:37
@KoenZomers KoenZomers added status:checked and ready for merge ✔ PR has been checked and is ready for merge and removed status:tracked Triaged and are being investigated further labels Jun 18, 2020
@KoenZomers KoenZomers removed their assignment Jun 19, 2020
@KoenZomers
Copy link
Collaborator Author

MSAL PR has been merged. Depending on when the next version of MSAL will be released containing this fix, we can replace the custom built MSAL version which is currently in this PR with the official one again. If the next MSAL release doesn't happen before our next release, we'll stick with our custom built MSAL version for our next release and will update it again in a future release.

@KoenZomers KoenZomers mentioned this pull request Jun 24, 2020
2 tasks
@KoenZomers
Copy link
Collaborator Author

This PR has been put on hold for now awaiting the 4.16 release of MSAL.

@KoenZomers KoenZomers reopened this Jun 30, 2020
@KoenZomers KoenZomers removed the status:checked and ready for merge ✔ PR has been checked and is ready for merge label Jun 30, 2020
@KoenZomers KoenZomers marked this pull request as draft June 30, 2020 10:55
@KoenZomers KoenZomers marked this pull request as ready for review July 7, 2020 21:14
@KoenZomers KoenZomers added the status:checked and ready for merge ✔ PR has been checked and is ready for merge label Jul 7, 2020
@KoenZomers
Copy link
Collaborator Author

KoenZomers commented Jul 7, 2020

MSAL 4.16 has been released earlier today. Updating this PR to use that.

@KoenZomers KoenZomers removed their assignment Jul 7, 2020
@erwinvanhunen erwinvanhunen merged commit dd4d439 into pnp:dev Jul 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:checked and ready for merge ✔ PR has been checked and is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants