question

BenP-1732 avatar image
0 Votes"
BenP-1732 asked BenP-1732 answered

POX Autodiscover Request Email Address Can't Be Found

I am trying to work with public folders on Exchange Online using EWS, and I need to do a POX Autodiscover request to determine the X-PublicFolderInformation header value as described here:
https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-route-public-folder-hierarchy-requests#bk_makeautodrequest

I am getting this error:
95673-image.png



I am using OAuth and Exchange Online, but I try doing the same request to an on premise Exchange server using NTLM, it works fine. Is this something that is not supported with OAuth, or could there be some other configuration changes I need to make in order for this to work? Thanks!

office-exchange-server-dev
image.png (30.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BenP-1732 avatar image
0 Votes"
BenP-1732 answered

I've gotten further with this. OAuth works as long as I use delegated permissions. Application permissions are what does not work.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BenP-1732 avatar image
0 Votes"
BenP-1732 answered

The RCA test succeeded. I also testing my code using basic authentication instead of OAuth, and it succeeded! Is it possible that the POX autodiscover service does not support OAuth authentication? I am able to make SOAP autodiscover requests using OAuth.

I found this question, and the individual is having the identical problem: https://docs.microsoft.com/en-us/answers/questions/276346/pox-autodiscover-requests-using-oauth-for-o365-end.html

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GlenScales-6756 avatar image
0 Votes"
GlenScales-6756 answered

The actual error is pointing towards an issue with the email address your trying to discover rather then an issue with the code, I would suggest trying to discover the address with the RCA first and see if that works https://testconnectivity.microsoft.com/tests/o365

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.