If you are working with multiple user or app identities (e.g. for testing), and the code uses ADAL, and especially if the application is killed or crashes, you may occasionally get an error: multiple_matching_tokens_detected: The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements (e.g. UserId) Note that it does not […]
Tip #1112: Impersonate Azure AD users
Developers are familiar with the concept of impersonating Dynamics 365 users. It’s easy – all you need to do is to add MSCRMCallerID header to your Web API request, and you’re done (assuming that you have prvActOnBehalfOfAnotherUser privilege). One of the typical scenarios where you’d want to use the impersonation when you have a web […]
Tip #1094: It is Time to Go with the Flow
Microsoft is making lots of noise of late about the soon to be released Spring Release. One of the key takeaways from those announcements is that PowerApps and Flow are a key element of the future for app development in Dynamics (Canvas Apps, as they call them). If you still think PowerApps and Flow are […]
Tip #1077: Connect to the right instance
As Guido “Future Olive Farmer” Preite has discovered, sometimes CrmServiceClient may connect to the wrong instance. Just like that. Dynamics 365 instances now can be backed up and restored at will. The side-effect of this awesomeness is that URLs and unique names may no longer match, leading to the fun times with connections. Here’s the […]
Tip #1066: Discover Azure AD tenant ID with Occam’s razor
As developers, from time to time we are puzzled by simple questions: How to discover Azure AD tenant ID based on Dynamics 365 organization URL? Under the normal circumstances I would have put my condescending hat on (did I forget to take it off, again?) and say something like “Use AuthenticationParameters.CreateFromResourceUrlAsync method from ADAL, of […]
Tip #1062: When recompile is not enough
As was mentioned in the Tip 1058, the most simple and easy way to deal with TLS 1.2 in your code is to recompile it with .net 4.6.2+. As David “Xrm.Tools” Yack discovered, it may not work for some of the existing projects. The issue is that, when the framework version changes in Visual Studio […]
Tip #1058: Connect to version 9 in your code
This tip is courtesy of Matt “SDK Deity” Barbour to make sure that we (developers) can stay connected to our beloved instances regardless of the version. Before copying the write-up almost verbatim, short version: tl;dr TLS 1.2 is now enforced so, for seamless connections to your version 9 instances, use the latest SDK tools and […]
Tip #1033: Use Fiddler to boost client-side development
Today’s tip is from Matt Beard – thank you! And, hey, you can be a guest tipster too – just send your tip to jar@crmtipoftheday.com. As a CRM developer, I regularly run through this exact process step by step when writing WebResources such as HTML or Javascript and I’m sure others do too. Write your […]
Tip #1032: Be careful with those function names
Today’s tip is from Tom Pickles – thank you! And, hey, you can be a guest tipster too – just send your tip to jar@crmtipoftheday.com. I fixed a curious issue today that I thought I’d share. Users had reported that when using the multi-edit form to update multiple cases, the form would freeze when they […]
Tip #1013: Include attributes that are not there
New Developer Guide, as it turned out, contains a lot of useful nuggets, little enhancements that make developer’s life much easier. How many times did you need some field values for the use in javascript but didn’t really want to include the fields on the form? Something like lattitude and longitude, for example. Would it […]