public async Task JobClient_Http_SasCredentialAuth_Success() { // arrange string signature = TestConfiguration.IoTHub.GetIotHubSharedAccessSignature(TimeSpan.FromHours(1)); using var jobClient = JobClient.Create( TestConfiguration.IoTHub.GetIotHubHostName(), new AzureSasCredential(signature)); string jobId = "JOBSAMPLE" + Guid.NewGuid().ToString(); string jobDeviceId = "JobsSample_Device"; string query = $"DeviceId IN ['{jobDeviceId}']"; var twin = new Twin(jobDeviceId); try { // act JobResponse createJobResponse = await jobClient .ScheduleTwinUpdateAsync( jobId, query, twin, DateTime.UtcNow, (long)TimeSpan.FromMinutes(2).TotalSeconds) .ConfigureAwait(false); } catch (ThrottlingException) { // Concurrent jobs can be rejected, but it still means authentication was successful. Ignore the exception. } }