Skip to content

Upload-WindowsAutopilotDeviceInfo - how to use client ID and secret? #69

@silicondt

Description

@silicondt

I am trying to use the latest version of Upload-WindowsAutopilotDeviceInfo (1.2.1)

The notes say "1.2.1 - (2023-06-07) Improved access token retrieval, now supports client credentials flow using ClientID and ClientSecret parameters"

Yet when I run the script and pass a CLIENT ID and a CLIENT secret from an azure app I made, it still pops up with a username and password prompt. What am I doing wrong?

Is there any guidance to how to create the enterprise app to work right? What permissions should be turned on in the app?

Example of code I tried.. but it still asks for a username and password.

Install-Script -Name Upload-WindowsAutopilotDeviceInfo -force -confirm:$false -Scope "AllUsers"

$tenant = "mydomain.com"
$ClientID = "12sdsdsdsd-ffff-ssss-eeee-dsfsdfsdfsdf"
$Clientsecret = "blablablabla"

cd "$env:ProgramFiles\WindowsPowerShell\Scripts"
./Upload-WindowsAutopilotDeviceInfo -TenantName $tenant -ClientID $clientID -ClientSecret $clientsecret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions