An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
Mikail Ceran hi there, and thanks for posting this...
even when u remove ALL conditional access policies, azure ad has some sneaky default protections for client credentials flow. they don't show up in the CA portal but they exist :)
check if u have any "tenant restrictions" enabled. these can block tokens without appearing in normal CA policies. another sneaky culprit could be "app management policies". they live at azure portal > azure ad > enterprise applications > app management policies. sometimes they override everything else :(
try this quick fix go to azure ad > security > identity protection, look for "mfa registration policy" or "user risk policy" - disable them temporarily just to test, also check "app consent policies" under azure ad > enterprise applications. if it still fails... here's the nuclear option (but it works): create a NEW conditional access policy that EXPLICITLY allows client credentials flow for your app. yes, u need to add a policy to fix "no policy" blocking )) irony at its finest.
when creating this policy, be sure target your specific app/service principal, select "client credentials" as the grant control, exclude all users (yes, exclude them, its weird but necessary)
let me know if my explanations helps
Best regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer
PPS That is my Answer and not a Comment