0

There is an argument called cloudServiceName when creating a new instance of SchedulerClient, but there's no documentation available on where that value comes from and the Azure portal isn't helpful either.

Here's the code I have so far:

var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadWrite);
var certificate = store.Certificates.Find(X509FindType.FindByThumbprint, "[Thumbprint]", false)[0];
store.Close();
var cloudCreds = new CertificateCloudCredentials("[MySubscriptionId]", certificate);
var client = new SchedulerClient("[Where do I find this value]", "MyJobCollection", cloudCreds);
The Muffin Man
  • 19,585
  • 30
  • 119
  • 191

1 Answers1

1

You must be using the old version of the Scheduler SDK. Please find the latest SDK here.

We also have a code sample for said SDK: https://github.com/Azure-Samples/scheduler-dotnet-getting-started

Derek Li
  • 3,089
  • 2
  • 25
  • 38
  • Thank you, I didn't realize I was using the old one. – The Muffin Man Jul 10 '17 at 19:12
  • The code sample doesn't expose where to obtain client id/secret. I had to google where to find the tenant id. The sample code is a good start, but it's not complete documentation. Not sure why this particular Azure resource is lacking, all the others have superb documentation. – The Muffin Man Jul 12 '17 at 03:05
  • Obtaining service principle is outside of the scope of the sample project, which is focused on showing how to use the Scheduler SDK. Service principle is an Azure wide concept for programatically accessing resources and nothing specific to Scheduler, you should be able to find how-tos on AAD documentation, e.g. https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal – Derek Li Jul 12 '17 at 22:53
  • Also, in App.config, line 7 also points you to a blog post on how to obtain these values. – Derek Li Jul 12 '17 at 23:09
  • Thanks for following up. I did stumble upon the blog post in the App.config, however I fear that it is too out of date as it doesn't match the current state of the Azure Portal. I was however, able to get part way based on the concepts, but I couldn't find a client id/secret in the Azure Portal to use. I opened up an issue about adding more documentation here https://github.com/Azure/azure-sdk-for-net/issues/3466#issuecomment-314872368 – The Muffin Man Jul 12 '17 at 23:57