title: Unsupported app only token issue in authenticating office365
body: <p>I have followed this link <a href="https://msdn.microsoft.com/en-us/office/office365/howto/building-service-apps-in-office-365" rel="nofollow">https://msdn.microsoft.com/en-us/office/office365/howto/building-service-apps-in-office-365</a> to
  set-up the Daemon or Server Application to Web API authentication method in Office365 to get access token.</p>
  
  <p>The sample access token request is given below</p>
  
  <pre><code>POST https://login.microsoftonline.com/{tenant-id}/oauth2/token
  grant_type : client_credentials
  client_id : {clientId}
  client_secret : {clientSecret}
  resource : https://{tenant}.sharepoint.com
  </code></pre>
  
  <p>For Example:</p>
  
  <pre><code>https://login.microsoftonline.com/cae788bd-7a55-4fb5-9d1f-3aa5365e14a/oauth2/token
  grant_type : client_credentials
  client_id : 1dd0a211-06f1-4f6a-a232-b3a8dcab829b
  client_secret : ZWtkWm9M5Ucx5j29UoXPy7GKG+Hu0eNdVFYO+lH761w=
  resource : https://{tenant}.sharepoint.com
  </code></pre>
  
  <p>From the above api request, I am getting an access token, when I tried to create the folder or accessing any other api's from the above access token then it is 
  showing an error as "Unsupported app only token". I have tried to call this webservices to get this error:</p>
  
  <pre><code>PUT https://{tenant}.sharepoint.com/_api/v1.0/Files/{parent-id}/children/{folder-name}
  Authorization : BearerBearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE
  Content-Type : application/json
  Accept : application/json
  </code></pre>
  
  <p>But previously we have used the same Daemon or Server Application to Web API authentication method in Office365 to get access token and it was working fine.</p>
  
  <p>And we have used the accesstoken to access the office 365 API's but now it is showing error as "Unsupported app only token".</p>