This blog is about SharePoint, Office365 and Office Development

Popular Posts

AD Synchronization to SharePoint user profile

In this post I will list the steps needed to synchronize active directory users to SharePoint user profile service

  1. Go to Central administration 
  2. Click on Mange Services on server

  3. Click start for the user profile synchronization service
  4. Enter the credentials for the account will run the service  
  5. Make sure that the service is Started 
  6. Go to Manage service application and click on the user profile service

  7. Go to synchronization section and click on configure synchronization connection
  8. Enter name of the connection and user credentials to connect to the AD 

  9. Test the connection by clicking on populate data 
  10. Save and back to the user profile service application page you can execute a full synchronization 
  11. To check the number of object synchronized go to the server running the user profile synch service and navigate to the path  "C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\UIShell"  
  12. Run the miisclient.exe and see the synchronization status 

HTML5 code is not working in SharePoint 2010

I've seen this question over and over , to make the HTML5 code working in SharePoint 2010 simple modifications to the OOTB master page is needed

  1. replace the first line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   with <!DOCTYPE HTML">
  2. Change the compitability to IE=9 instead of 8  by replacing <meta http-equiv="X-UA-Compatible" content="IE=8"/>   with <meta http-equiv="X-UA-Compatible" content="IE=9"/>


Upload local Files to remote SharePoint site

This post is to answer a question how to upload files to a remote SharePoint installation , for remote SharePoint installation we have different options

  • Using RESTful api which is in the new SharePoint 2013 is a very powerful API , using RESTful api can be via Javascript ajax calls (GET/POST) or using a Console Application
  • The other option is to use the Client Object model 
In this post we will elaborate how to use the client object model to upload files to a remote Document Library

  1. Create new Console Application 
  2. Add the SharePoint Client dlls to the project references
  3. Write the below code :


Provider Hosted Application Token not sent along with the standard tokens

On
I've recently updated one of my SharePoint 2013 apps , after deploying the new version to the test environment I keep getting weird errors , when I viewed the URL I noticed that there is no token passed by to the provider hosted application:

I checked the updated Web.config and I discovered that the Client Id and client secret are both empty 
<appsettings><add key="ClientId" value="">
    <add key="ClientSecret" value="">
  </add></add></appsettings>

to make sure that the client context will be successfully retrieved via the method
 public static string GetContextTokenFromRequest(HttpRequest request){
            string[] paramNames = { "AppContext", "AppContextToken", "AccessToken", "SPAppToken" };
            foreach (string paramName in paramNames)
            {
                if (!string.IsNullOrEmpty(request.Form[paramName])) return request.Form[paramName];
                if (!string.IsNullOrEmpty(request.QueryString[paramName])) return request.QueryString[paramName];
            }
            return null;
        }

make sure that the deployed application contains the correct client id and secret you created via Seller dashboard

how to create new client id please review the previous post