On behalf of token issue (AADSTS50013: Assertion contains an invalid signature)

有些话、适合烂在心里 提交于 2019-12-06 13:39:16

My understanding is: first you get user token from your Cortana access ms graph API; and then you want to use the user token to generate the OBO token in Microsoft Bot Framework API; final, you want to use the OBO token to access API B from Microsoft Bot Framework API.

You want to get OBO token in Microsoft Bot Framework API, you should use the API id and the secret, for this, I have never tried this.

On my side, I use v1 endpoint, I create two API (API A and B) and my flow is: First, my app requests token1 for API A;

Next, use the token1 to request OBO token2 for API B from API A;

Final, use the OBO token2 to request OBO token3 for aad graph API from API B.

For the OBO in v1 endpoint, please read link1.

For the OBO in v2 endpoint, please read link2.

We could able to resolve this issue by configuring our dependent custom API (API B) "user_impersonation" scope to Cortana channel configuration to our Bot. With this configuration change, we do not need to generate On-Behalf-Of token to API B from our Microsoft Bot application.

Thanks to all who has supported to provide solutions for this thread...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!