SharePoint 2013: Import, validate, and manage app licenses

Learn how to import and manage app licenses, as well as how to retrieve, validate, and communicate licensing states in your apps for SharePoint. Using the tools in the sample, developers can import test licenses, validate licenses, and manage license assignment within SharePoint.

C# (2.2 MB)
 
 
 
 
 
4.3 Star
(6)
1,490 times
Add to favorites
6/20/2013
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
var SPHostUrl;
var SPHostTitle;
var SPAppWebUrl;
var SPLayoutsFolder;
var pageTitle;


function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.search);
    if (results == null)
        return "";
    else
        return decodeURIComponent(results[1].replace(/\+/g, " "));
}

function loadChromeControl(pPageTitle, pSPHostUrl, pSPAppWebUrl) {
    SPHostUrl = pSPHostUrl;
    //SPHostTitle = pSPHostUrl;
    SPAppWebUrl = pSPAppWebUrl;
    SPLayoutsFolder = SPHostUrl + '/_layouts/15/';
    pageTitle = pPageTitle;
    $.getScript(SPLayoutsFolder + 'sp.ui.controls.debug.js', chromeControlLibraryLoaded);

}


function chromeControlLibraryLoaded() {

    var options = {
        siteUrl: SPHostUrl,
        //siteTitle: SPHostTitle,
        appHelpPageUrl: "../Pages/Help.html",
        appIconUrl: "AppIcon.png",
        appTitleIconUrl: "AppTitleIcon.png",
        appTitle: pageTitle,
        settingsLinks: [
            {
                linkUrl: "http://www.bing.com",
                displayName: "Dummy setting link Bing.com"
            },
            {
                linkUrl: "http://www.microsoft.com",
                displayName: "Dummy setting link Microsoft.com"
            }
        ]
    };

    /*
    * Initialize the control and make it visible.
    */
    var nav = new SP.UI.Controls.Navigation("chrome_ctrl_container", options);
    nav.setVisible(true);

}