dahall / TaskScheduler

Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
MIT License
1.21k stars 191 forks source link

Not able to create task using Managed Service account by passing xml payload #848

Closed Venkatesh-Appala closed 4 years ago

Venkatesh-Appala commented 4 years ago

I get below error when I try to create task using Managed Service account by passing xml payload. Any help appreciated!!

2020-03-10 13_57_25-Photos
dahall commented 4 years ago

That means you have an error on line 40 of your xml

Venkatesh-Appala commented 4 years ago

Thanks a lot for the response. Attached is the xml used. I don’t see ay error. Please help me.

Thanks Venkatesh Appala

From: David Hall notifications@github.com Sent: Thursday, March 12, 2020 6:06 PM To: dahall/TaskScheduler TaskScheduler@noreply.github.com Cc: Venkatesh Appala (MAQ LLC) v-veappa@microsoft.com; Author author@noreply.github.com Subject: Re: [dahall/TaskScheduler] Not able to create task using Managed Service account by passing xml payload (#848)

That means you have an error on line 40 of your xml

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdahall%2FTaskScheduler%2Fissues%2F848%23issuecomment-598498726&data=02%7C01%7Cv-veappa%40microsoft.com%7C5efb20665292461f035e08d7c6eabe61%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637196583839412690&sdata=9axt07iMOJpL%2BnePXZ29M3LEjeRNVRW%2FKVWUb6g3900%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALZS4KUCBY5QZD7LKV2RZ4DRHGBI3ANCNFSM4LGYJIWA&data=02%7C01%7Cv-veappa%40microsoft.com%7C5efb20665292461f035e08d7c6eabe61%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637196583839422685&sdata=g5rgSt4NhJB7drBiu%2FFl9D3jRAkz%2BSrqTmhbBS8%2B0fk%3D&reserved=0.

Venkatesh-Appala commented 4 years ago

Attaching file here Test.txt

dahall commented 4 years ago

This XML includes a <LogonType>Password</Password> tag. Registering this will fail since it requires new credentials to be entered.

Venkatesh-Appala commented 4 years ago

Thanks for the response. If I am using MSA account, what should be my LogonType? I use the same LogonType as Password when I am registering task using SchTasks.exe. But the same is not working with Task Scheduler dll.

I tried with Log on Type as Service Account as well. Error changed and its showing error in the LogonType line.

dahall commented 4 years ago

See if #820 or #350 help you.

Venkatesh-Appala commented 4 years ago

Thanks. LogonType.None worked for my MSA account.