Showing posts with label Sites. Show all posts
Showing posts with label Sites. Show all posts

Saturday, October 24, 2015

Get all sites with REST API and AngularJS


<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script> 
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script> 
     
<script> 
        var myAngApp = angular.module('SPAngGetWeb', []); 
        myAngApp.controller('SPAngGetWebController', function ($scope, $http) { 
            $http({ 
                method: 'GET', 
                url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/webs?$orderby=Title", 
                headers: { "Accept": "application/json;odata=verbose" } 
            }).success(function (data, status, headers, config) { 
                $scope.customers = data.d.results; 
            }).error(function (data, status, headers, config) { 
           
            }); 
        }); 
</script> 


<div ng-app="SPAngGetWeb"> 
    <div ng-controller="SPAngGetWebController" > 
        <table style="width: 100%;"> 
            <tr> 
                <th style="">Id</th> 
                <th style="">Title</th>
                <th style="">Created</th>
                <th style="">ServerRelativeUrl</th> 
                <th style="">Url</th>
                <th style="">WebTemplate</th> 
            </tr> 
            <tr ng-repeat="customer in customers"> 
                <td >{{customer.Id}}</td> 
                <td>{{customer.Title}}</td> 
                <td>{{customer.Created |date:'M/d/yyyy HH:mm'}}</td> 
                <td>{{customer.ServerRelativeUrl}}</td> 
                <td>{{customer.Url}}</td> 
                <td>{{customer.WebTemplate}}</td> 
                 
                </tr> 
        </table> 
    </div> 
</div> 

Administrator is not able to change user’s picture in User Profile in SharePoint Admin Center

For some users Admin is able to change picture by going to User Profile -> Manage user profile option. But for some users , Admin ...