As with any (relatively) new Azure app there is always pain mixed in with the pleasure. The simplicity of the Logic Apps Designer can throw in curve balls that can only be handled in the Code View.
A good example of this is the SQL -Get Row connector and what happens if the row is not found.
The default logic here is to look for the row and then progress if the Row Id can be matched, and in the Designer view this is all handled for you. But what if you want a condition where you want to handle this failure. The Designer allows us to put in a check for the failure, although you have to edit it in Advanced mode. The problem is that the Designer does not let you allow ‘Failed’ as a valid option.
In the Designer view this is not obvious (at the moment) so you need to switch to the Code view. The default runAfter option (for the Condition) is set to ‘Succeeded’
"Get_row" : [ "Succeeded" ]
So what we need to do is add ‘Failed’ as a valid option
"Get_row" : [ "Succeeded", "Failed" ]
The ‘Get row’ is then able to succeed by failure when no matching row is found and the Condition check will be evaluated correctly.
Using the Google Recaptcha verification API should be fairly straight forward. The one thing the documentation does not make clear is how to POST to the SiteVerify endpoint. So after playing around with the various options in Postman, I have found the following code works from the server side using C#.
HttpClient httpClient = new HttpClient();
KeyValuePair<string, string> secret = new KeyValuePair<string, string>("secret", recaptcha.Secret);
KeyValuePair<string, string> response = new KeyValuePair<string, string>("response", recaptcha.Response);
List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();
using (var content = new FormUrlEncodedContent(postData))
var recaptchaResponse = await httpClient.PostAsync(RecaptchaAPIUrl, content);
var returnValue = recaptchaResponse.Content.ReadAsStringAsync().Result;
var vr = JsonConvert.DeserializeObject<VerifiedResponse>(returnValue);
I have found Postman to be a very useful tool for testing Web Api’s, but according to Postman’s documentation, sending certain restricted headers can be an issue. Using Postman Interceptor allows you to overcome this restriction but I came across one problem when setting the restricted Date header.
I had been using the Pre-requests scripts to set the Date dynamically using environment variables, again following the documentation. However, each time I submitted the request my Date header was coming through as null. The problem turned out to be the date format as this needs to be in GMT format and fortunately the fix turned out to be relatively simple.
Came across this very useful tool for comparing CSS Specificity.
This is very useful for identifying why your CSS might be overridden by competing styles in other files.
If you know the relative Url of the folder within SharePoint there is a straight forward way to access the files within that folder.
using (ClientContext clientContext = new ClientContext(&quot;https://something.sharepoint.com/sites/mysite/&quot;))
Folder folder = clientContext.Web.GetFolderByServerRelativeUrl(&quot;/sites/mysite/root_folder/sub_folder&quot;);
// Load the Folder and Files into the ClientContext so we can access them
foreach (var item in folder.Files)
// Load each file into the ClientContext to access the file information
When you have the Skype for Business app installed on your machine you cannot open the meeting in a browser (web app) without it trying to force you to use the full application. This can be frustrating because you may want to join a meeting for client who is not part of your business. In my scenario:
- I was logged out of my SfB desktop app
- Opened IE and pasted in the URL for the meeting.
- This then tries to open the desktop app and fails.
- Since Edge was my default browser the system then tries to open Edge and takes you to the download page for the Lync Web App. Since Edge does not work with SfB then I cannot access my meeting.
The solution comes in the form of a query string parameter appended to the URL. Open IE, enter the URL to the conference call and append ?SL=1 to the end and press ENTER.
- CRM 2011 with Rollup 18
- Using an existing CRM 2011 database backup, restore a copy of the database with a new name.
- Import that database using the Deployment Manager to create a new organisation. The small number of existing users were automatically mapped across to the new organisation.
When I attempted to login to the organisation I was presented with the following:
I knew the problem wasn’t with the domain account because I could use it to log into other CRM organisations on the same server. I could also login to the newly created organisation with a different domain user; doing this allowed me to confirm that the problem domain account did exist in the list of active users. Something was missing for this user in the new organisation.
After some digging around I got some pointers to the MSCRM_CONFIG database and the SystemUserOrganizations table, which links your System User to Organisations on your CRM server.
Disclaimer: The steps below interact directly with the CRM databases. If you aren’t familiar with these databases, please do not attempt these steps as many things can go wrong if you make a mistake.
- Find the OrganizationId and SystemUserId from the SystemUserBase table in the Organisation database.
- Use the following query to identify to which Organisations the account is linked;
from SystemUserAuthentication sua
inner join SystemUserOrganizations suo on sua.UserId = suo.UserId
where suo.CrmUserId = '<my-systemuserid>'
order by suo.OrganizationId, sua.UserId, sua.AuthInfo
- Each Organisation should have two entries, one for the Active Directory SID and one for the CRM username. In my case there were only two entries for the original organisation and none for the newly imported organisation.
- Create the new entry in the SystemUserOrganizations table to link the existing System User to the newly imported Organisation.
insert into SystemUserOrganizations (
- The domain account is now able to access the new organisation.