// construct Lock// var lock = ...[...]// One or more SharePoint client IDs here for which you want// a Windows Auth buttonvar sharepointClientIDs = ['your_sharepoint_client_id'];if (sharepointClientIDs.indexOf(config.clientID) >= 0) { lock.on('signin ready', function() { var getParameterByName = function(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if (results == null) return null; else return results[1]; }; // get the host from the callback URL var parser = document.createElement('a'); parser.href = config.callbackURL; var host = parser.host; var windowsAuthURL = "https://" + host + "/_windows/default.aspx?ReturnUrl=/_layouts/15/Authenticate.aspx"; var wctx = getParameterByName("wctx"); if (wctx) { windowsAuthURL += "&Source=" + wctx; } $('.auth0-lock-tabs-container') .after('<div><p class="auth0-lock-alternative" style="padding:5px 0;">' + '<a class="auth0-lock-alternative-link" ' + 'href="'+ windowsAuthURL + '">' + 'Login with Windows Authentication!!!</a>' + '</p><p><span>or</span></p></div>').attr('href','https://nowhere'); });}lock.show();
using System;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using Microsoft.Office.Server;using Microsoft.Office.Server.UserProfiles;namespace UserProfileSync{ class Program { static void Main(string[] args) { // Call the Auth0 Management API - https://docs.auth0.com/api/v2 using (var site = new SPSite("http://servername")) { var context = SPServiceContext.GetContext(site); var profileManager = new UserProfileManager(context); var accountName = "i:05.t|auth0|john@example.org"; var userProfile = profileManager.GetUserProfile(accountName); userProfile[PropertyConstants.HomePhone].Value = "+1 594 9392"; userProfile.Commit(); } } }}