3

I am trying to create a simple PHP script that uses oAuth and I seem to require the Tenant ID of my SharePoint Online account. I'm sure this is something very straight forward, but I can't seem to locate it.

Thanks!

5

I found this approach (blog.scoreman.net) easier:

Navigate to https://.sharepoint.com/_layouts/appprincipals.aspx. Identify the row with your registered application and look at the App Identifier column. The unique identifier after the @-sign in the App Identifier is the app realm. Copy the realm (not the whole App Identifier just the last part after the @-sign).

1

Tenant ID is nothing but SharePoint Online Site Realm.

You can get this by having a REST call to the site API.

Follow below steps:

Header: Authorization: Bearer

  • Get the Bearer realm component from the response header and save it.

Check the below post for complete step to be followed:

http://spshell.blogspot.in/2015/03/sharepoint-online-o365-oauth.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.