Hello All,
As In one apigee flow we are trying to connect thought service callout policy who validated the Bearer token passed into this and then extract the data to use to generate the apigee token using the client_credential method. @Dino @Anil Sagar @Naseer Mohammad could you please provide your inputs on this.
Below is our service callout policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceCallout async="false" continueOnError="false" enabled="true" name="SC-ValidateOutlookTokenForUserProfile"> <DisplayName>SC-ValidateOutlookTokenForUserProfile</DisplayName> <FaultRules/> <Properties/> <Request variable="OutlookProfileRequest"> <Set> <Verb>GET</Verb> <Headers> <Header name="Authorization">{outlook_token}</Header> <Header name="Access-Control-Allow-Origin">*</Header> </Headers> </Set> </Request> <Response>OutlookProfileResponse</Response> <HTTPTargetConnection> <URL>https://graph.microsoft.com/v1.0/me/</URL> </HTTPTargetConnection> </ServiceCallout>
When I hit the apigee API below is the response
{ "fault": { "faultstring": "Execution of ServiceCallout SC-ValidateOutlookTokenForUserProfile failed. Reason: timeout occurred in SC-ValidateOutlookTokenForUserProfile", "detail": { "errorcode": "steps.servicecallout.ExecutionFailed" } } }
And sometime below response:
{ "fault": { "faultstring": "Execution of ServiceCallout SC-ValidateOutlookTokenForUserProfile failed. Reason: ResponseCode 401 is treated as error", "detail": { "errorcode": "steps.servicecallout.ExecutionFailed" } } }