英文:
azure ad b2c restful api app insights where are the returned claims?
问题
在应用洞察中,对于连接到REST API的自定义策略中的技术配置文件,参数是如何显示的?
英文:
I have the following technical profile
<TechnicalProfile Id="REST-GetTAndCsForUser-Test">
<DisplayName>Get user extended profile Azure Function web hook</DisplayName>
<Protocol Name="Proprietary"
Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="ServiceUrl">https://myurl</Item>
<Item Key="SendClaimsIn">QueryString</Item>
<Item Key="AuthenticationType">Bearer</Item>
<Item Key="UseClaimAsBearerToken">accessToken</Item>
<Item Key="AllowInsecureAuthInProduction">false</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="accessToken" />
<InputClaim ClaimTypeReferenceId="email" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="accepted"
/>
<OutputClaim ClaimTypeReferenceId="acceptionRequired" />
<OutputClaim ClaimTypeReferenceId="tcDateAccepted" />
<OutputClaim ClaimTypeReferenceId="tcVersionAccepted" />
</OutputClaims>
</TechnicalProfile>
When I test the endpoint with Postman, I get the following:
{
"accepted": true,
"acceptionRequired": false,
"tcDateAccepted": "2023-05-10",
"tcVersionAccepted": "latest"
}
But when I go to app insights I see the following:
and I can't see what the endpoint is returning in app insights, I believe that my problem is around that, that I am not getting the same values or not getting nothing at all, so my question is in app insights, for a custom policy, for a technical profile that connects to a rest api, how are the parameters shown?
答案1
得分: 0
我找到了问题。
假设我的URL是https://..../something?email=my@email.com,那么myurl = ..../something。
在Postman中使用该URL时,它会带来正确的结果,但当我使用技术配置文件时,它什么都没有带来,因此是正确的结果,因为API返回了其他内容,或者根本没有返回任何内容。
因此,在应用程序洞察本身没有错误,问题出在技术配置文件上。
英文:
I found the problem.
let's say my url was https://..../something?email=my@email.com, myurl = ..../something
when doing postman with that url, it was bringin the right results, but when I had that technical profile, it wasn't bringing anything, so it was the right results, because the api was returning something else, or nothing at all.
So there was no error, in the app insights itself, it was on the technical profile,
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论