Azure AD B2C的RESTful API应用洞察,返回的声明在哪里?

huangapple go评论49阅读模式
英文:

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:

Azure AD B2C的RESTful API应用洞察,返回的声明在哪里?

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,

huangapple
  • 本文由 发表于 2023年5月11日 02:05:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76221421.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定