Skip to content

Issue running Get-authtoken from Task Scheduler unattended #284

@komman-ship-it

Description

@komman-ship-it

The authresult is empty without any exceptions when ran using a task scheduler

  • works fine when run manually from powershell
  • Fails in manual/scheduled on Task manager
  • Run as with dedicated service account with local admin rights, run as batch user rights
  • Uses a UPN which has Intune admin rights
  • Script works great when running in powershell but fails to get response for auth result when called with " Start-Process powershell.exe -argumentList "-executionPolicy Bypass -File "

Anyone started noticing this recently? Appreciate any pointers

$authResult = [Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions]::AcquireTokenAsync($authContext, $resourceAppIdURI, $clientid, $userCredentials)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions