Azure B2C custom policy client credentials flow is failing and applications insight is not showing any details other than a general excetion
I have this custom technical profile created as a part of my flow to do client credentials and add some custom claims to my access_token
<ClaimType Id="customClaim">
<DisplayName>customClaim</DisplayName>
<DataType>string</DataType>
</ClaimType>
<ClaimsProvider>
<DisplayName>ClientCredentialsFlow</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="ClientCredentialsFlow">
<DisplayName>Client Credentials Flow</DisplayName>
<Protocol Name="OAuth2" />
<Metadata>
<Item Key="client_id">xxx</Item>
<Item Key="client_secret">xxx</Item>
<Item Key="grant_type">client_credentials</Item>
<Item Key="scope">https://xxx.onmicrosoft.com/api/.default</Item>
</Metadata>
<OutputClaims>
<!-- Output claims generated by the access token generation -->
<OutputClaim ClaimTypeReferenceId="customClaim" />
<!-- Add more output claims as needed -->
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
<OrchestrationStep Order="9" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="GenerateBearerToken12" TechnicalProfileReferenceId="ClientCredentialsFlow" />
</ClaimsExchanges>
</OrchestrationStep>
When i run my userflow i get this error Sorry, but we're having trouble signing you in. We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, please try again. Correlation ID: 7e6f4f9f-3ee1-46e7-bcd8-8f8e6cdf73f4 Timestamp: 2024-01-16 20:47:47Z AADB2C: An exception has occurred. In Application Insights it shows nothng but this error
Why is my Client credentials grant not working .. I tested the url the client_id and client secret via postman using the token endpoint and it works great and i get an access token .. Any help here would be greatly apprecoated