Skip to content

Instantly share code, notes, and snippets.

@VibhuKuchhal
Created June 1, 2016 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VibhuKuchhal/c4b0ad2f0be1fd69396bd2b0f9b94d4b to your computer and use it in GitHub Desktop.
Save VibhuKuchhal/c4b0ad2f0be1fd69396bd2b0f9b94d4b to your computer and use it in GitHub Desktop.
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<WebPartPages:AllowFraming ID="AllowFraming" runat="server" />
<html>
<head>
<title></title>
<script type="text/javascript" src="../Scripts/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/_layouts/15/MicrosoftAjax.js"></script>
<script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="/_layouts/15/sp.js"></script>
<script type="text/javascript" src="../Scripts/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" src="../Scripts/AadPicker.js"></script>
<link rel="Stylesheet" type="text/css" href="../Content/bootstrap.css" />
<link rel="Stylesheet" type="text/css" href="../Content/jquery-ui.min.css" />
<script type="text/javascript">
// Set the style of the client web part page to be consistent with the host web.
(function () {
'use strict';
var hostUrl = '';
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
if (document.URL.indexOf('?') != -1) {
var params = document.URL.split('?')[1].split('&');
for (var i = 0; i < params.length; i++) {
var p = decodeURIComponent(params[i]);
if (/^SPHostUrl=/i.test(p)) {
hostUrl = p.split('=')[1];
link.setAttribute('href', hostUrl + '/_layouts/15/defaultcss.ashx');
break;
}
}
}
if (hostUrl == '') {
link.setAttribute('href', '/_layouts/15/1033/styles/themable/corev15.css');
}
document.head.appendChild(link);
})();
$(function () {
var tenant, token;
//"http://localhost:9279/api/Authentication",
$.ajax({
url: "https://peoplepickerapp1.azurewebsites.net/api/Authentication",
dataType: "json",
type: "GET",
success: function (data) {
console.log(data);
if (data != null) {
tenant = data.TenantName;
token = data.Token;
}
}
}).done(function () {
AadInitiator(tenant, token)
});
});
</script>
</head>
<body>
<div class="container body-content">
<div class="row">
<input class="form-control aadpicker" data-nature="autocomplete" data-minlength="0" data-idpairing="objectid" data-emailpairing="email" style="min-width: 50%; max-width: 50%;" placeholder="Select User" />
<input class="form-control" id="email" style="min-width: 50%; max-width: 50%;" />
<input class="form-control" id="objectid" style="min-width: 50%; max-width: 50%;" />
</div>
<hr />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment