0

I know how to do it from SPFX extension but I need to detect SP type from desktop application interacting with SP by REST API.

  • Their Rest API host part are different, All SPO tenants are "xxx.sharepoint.com". Is it enough to detect the SP type? – Baker_Kong_MSFT Jun 26 at 4:05
0

It is quite simple. You can use _spPageContextInfo.isSPO to check if it is SharePoint online.

_spPageContextInfo.isSPO returns true if it is SharePoint online.

Refer below snapshot.

enter image description here

| improve this answer | |
  • My app is C# desktop application, so I don't use SP JavaScript library and has no access to page context _spPageContextInfo object. – 23W Jun 26 at 9:46
  • Do we have analog for "<site url>/_api/" request ? – 23W Jun 26 at 9:59

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.