public async Task <bool> SavePage([FromBody] ConnectorEntity page, [FromUri] string jobId) { string sourceInfo = await sourceProvider.GetAuthTokenForResource(page.Id, jobId); PageJobMappingTable = azureTableProvider.GetAzureTableReference(Settings.PageJobMappingTableName); PageJobEntity pageJobEntity = new PageJobEntity(page.Id, jobId); pageJobEntity.SourceInfo = sourceInfo; await azureTableProvider.InsertEntityAsync(PageJobMappingTable, pageJobEntity); Trace.TraceInformation("Job Setup complete page succesfully saved for jobId: {0}", jobId); try { Trace.TraceInformation("Job with JobId: {0} subscribing to webhook", jobId); await sourceProvider.Subscribe(pageJobEntity.SourceInfo); Trace.TraceInformation("Job with JobId: {0} successfully subscribed to webhook", jobId); } catch (Exception e) { Trace.TraceInformation("Job with JobId: {0} subscribed to webhook failed with error: {1}", jobId, e.Message); return(false); } return(true); }