Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
255 views
in Technique[技术] by (71.8m points)

Always getting 'Unknown Error' response when using Microsoft Graph beta getAllMessage api

I am trying to use Microsoft Graph beta getAllMessage api to get all messages from all teams chats. This is the getAllMessage url below: https://docs.microsoft.com/en-us/graph/api/chats-getallmessages?view=graph-rest-beta

The problem is I am always getting Unknown Error and Unauthorized 401 response and I have consented all the permission as the pic shown: enter image description here

I also found a Note shown this api is a Protected API in Microsoft Teams. enter image description here

But I can not see this getAllMessage api in the list of Protected API.enter image description here

I am starting getting lost now. Hope someone knows the real cause of this problem and let me know whether should I submit the Protected API request form or not.

Thanks

Di

question from:https://stackoverflow.com/questions/65849424/always-getting-unknown-error-response-when-using-microsoft-graph-beta-getallme

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I see that you're calling Getallmessages() and facing the error. Yes the documentation is correct. As you're calling application permission and getting the messages/chat then it comes under protected api's - so you need to submit the request, get approval as discussed in the document. This will help you move forward.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...