Ok, so I have used OAuth and gotten my JWT token and I’m having a lot of success using the REST API to do what I want to do (upload/download files and folders) however, when I get a list of sites I get some sites that I can see but I cannot get into, I get an ‘Invalid Audience’ error.

So I get the oath token and then I run a query to get all the sites available


I get

  • webUrl = https://example.sharepoint.com/sites/contentTypeHub
  • webUrl = https://example-public.sharepoint.com
  • webUrl = https://example.sharepoint.com
  • webUrl = https://example.sharepoint.com/sites/asdf
  • webUrl = https://example.sharepoint.com/portals/community
  • webUrl = https://example-my.sharepoint.com/personal/prince_oberon_b...k_io
  • webUrl = https://example-my.sharepoint.com/personal/zst...rt_example_onmicrosoft_com
  • webUrl = https://example-my.sharepoint.com/personal/jaime_lannister_b...k_io
  • webUrl = https://example-my.sharepoint.com/personal/ned_stark_b...k_io
  • webUrl = https://example-my.sharepoint.com/personal/a...ek_example_onmicrosoft_com

I am able to do everything I want with the example-my subdomains, but not the other domains.

So to restate, my understanding is I need a different JWT token for each domain (example,example-public, example-my) is that right?

If that is right, do I need to have the user go through the auth steps for each one?

Thank you for any regard you give my question.

Your Answer

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

Browse other questions tagged or ask your own question.