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

Function Get-AutopilotDevice() throwing error: Invoke-MgGraphRequest: The pipeline has been stopped. #6

Closed
Sn00zEZA opened this issue Jul 10, 2023 · 9 comments

Comments

@Sn00zEZA
Copy link

The Function Get-AutopilotDevice() is throwing an error: Invoke-MgGraphRequest: The pipeline has been stopped.

its with line 304 https://github.com/andrew-s-taylor/WindowsAutopilotInfo/blob/7fe10613188b71c6319331eb24cd2ed79258a519/Community%20Version/get-windowsautopilotinfocommunity.ps1#L304C13-L304C89

@andrew-s-taylor
Copy link
Owner

How are you connecting to Graph in the script?

@Sn00zEZA
Copy link
Author

How are you connecting to Graph in the script?

App-based authentication

@andrew-s-taylor
Copy link
Owner

Can you provide steps for me to replicate?

@Sn00zEZA
Copy link
Author

Sn00zEZA commented Jul 10, 2023

Wrapping Get-WindowsAutoPilotInfoCommunity as function in script. Retrieving appid, appsecret and grouptag from AzureKeyVault after user authentication

$AutopilotParams = @{
Online = $true
TenantId = $($azAccountContext.tenant.id)
AppId = ($appSecretKey).AppId
AppSecret = ($appSecretKey).AppSecret
GroupTag = $($groupTagSelect.Value)
Assign = $True
}
Get-WindowsAutoPilotInfoCommunity @AutopilotParams

Using default $Name variable "localhost" as the script is run on the machine being imported.
All device info collected correctly.
Do get the message "Connected to Intune tenant ###### using app-based authentication (Azure AD authentication not supported)"
Script was working fine last week. This seemed to have started today.

@andrew-s-taylor
Copy link
Owner

It seems to be a clash with the latest version of az.accounts and microsoft.graph.authentication modules.
You'll need to raise that one with Microsoft as I have no control over their modules.

@Sn00zEZA
Copy link
Author

Sn00zEZA commented Jul 10, 2023

thank you.. will raise a ticket

@andrew-s-taylor
Copy link
Owner

In the meantime, if you rollback the az.accounts module, it should start working again

@Sn00zEZA
Copy link
Author

Sn00zEZA commented Jul 10, 2023

will run a test with az.accounts version 2.12.3

@Sn00zEZA
Copy link
Author

Sn00zEZA commented Jul 10, 2023

Using az.accounts v2.12.3 with microsoft.graph.authentication v2.0.0 did not work. Downgraded microsoft.graph.authentication to v1.28.0 and az.accounts v2.12.3 is working for me. Will test other versions also and report the issue.

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

2 participants