In a previous blog post I shared how you can use a little Azure Function to get a BC artifact (actually the URL to a BC artifact) without PowerShell by just doing an http request. With that it was also possible to get the so-called insider artifacts for preview versions of BC that were not yet publicly available, using a specific token shared by Microsoft to partners in a collaboration program. But since version 6.0.0 of the bccontainerhelper and specifically this commit, that is no longer required. You only need to accept the insider EULA by now. That didn’t change too much for me because I am using COSMO Alpaca for my BC containers, so all that stuff is magically handled behind the scenes for me, but others do have the requirement.

The TL;DR

Thanks to Arthur, my Azure Function can now handle that as well. All you need to do is request on of the insider artifacts like NextMajor and it automatically works. Try this link for example, and it will just give you the artifact url for the next major release: [https://bca-url-proxy.azurewebsites.net/bca-url/Sandbox/BASE?select=NextMajor&DoNotRedirect=true][https://bca-url-proxy.azurewebsites.net/bca-url/Sandbox/BASE?select=NextMajor&DoNotRedirect=true]

The details

Actually, there are not that many details. Arthur reached out to me via a Github issue whether I could implement support for the insider EULA, but as I had seen his name pop up quite often in the BC tech community, I thought that I might be able to convince him to give it a try by himself. And sure enough, his answer was “Challenge accepted 😅”. And not only did he accept the challenge, he implemeted it flawlessly and even made my code better along the way in his pull request. The most relevant part of it are those two lines:

1
2
3
4
5
var accept_insiderEulaParam = GetAcceptInsiderEulaParam(accept_insiderEula, select, sasToken);

...

bcchCommand = $"Get-BCArtifactUrl{typeParam}{countryParam}{versionParam}{selectParam}{afterParam}{beforeParam}{storageAccountParam}{sasTokenParam}{accept_insiderEulaParam}{doNotCheckPlatformParam}";

But to make it really flexible and help everyone who wants to use it, he created a very fool-proof implementation for identifying the need for the insider EULA flag:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
private string GetAcceptInsiderEulaParam(string accept_insiderEula, string select, string sasToken)
{
    var accept_insiderEulaParam = " -accept_insiderEula";

    if (IsValidParamSet(accept_insiderEula))
        return accept_insiderEulaParam;

    if (!string.IsNullOrEmpty(accept_insiderEula))
        return string.Empty;

    if (!string.IsNullOrEmpty(sasToken))
        return string.Empty;

    if (string.IsNullOrEmpty(select))
        return string.Empty;

    switch (select.ToLower())
    {
        case "nextminor":
        case "nextmajor":
            return accept_insiderEulaParam;
        default:
            return string.Empty;
    }
}

Bottom line: A nice PR that helped me (and “help” really is an understatement) to support this new functionality in my BC artifact URL proxy. Once more, I am very happy to be in the BC community, where a lot of knowledge and skill is shared freely!