<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Be&#39;ante Amelak on Medium]]></title>
        <description><![CDATA[Stories by Be&#39;ante Amelak on Medium]]></description>
        <link>https://medium.com/@Banteamelak?source=rss-7ef56deeb85d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Be&amp;#39;ante Amelak on Medium</title>
            <link>https://medium.com/@Banteamelak?source=rss-7ef56deeb85d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:25:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Banteamelak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MuleSoft Government Cloud API security with Azure JWT Token (Bantamelak Tafete Ayalew)]]></title>
            <link>https://medium.com/@Banteamelak/mulesoft-government-cloud-apis-security-with-azure-jwt-entra-id-8db75a76dd37?source=rss-7ef56deeb85d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8db75a76dd37</guid>
            <dc:creator><![CDATA[Be'ante Amelak]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 06:44:38 GMT</pubDate>
            <atom:updated>2026-05-16T23:50:14.849Z</atom:updated>
            <content:encoded><![CDATA[<p>Securing MuleSoft Government Cloud with the native OAuth 2.0 integration with Azure (Microsoft Entra ID) as a client provider is not supported in the same way it is in commercial MuleSoft environments.</p><p>we can secure MuleSoft Government Cloud APIs using Azure as a client identity provider with JWT (JSON Web Tokens), and then validate those tokens within MuleSoft using API Manager policies.</p><p><strong>This guide walks you step by step through:</strong></p><ul><li>Creating an app in Microsoft Entra ID</li><li>Configuring JWT token issuance</li><li>Setting up MuleSoft Access Management</li><li>Securing your API using JWT validation</li><li>Test the JWT token generation with Postman</li></ul><h3>1. Create an Application in Microsoft Entra ID</h3><h3>Step 1: Register a new application</h3><ol><li>Go to the <strong>Azure Portal</strong></li><li>Navigate to <strong>Microsoft Entra ID</strong></li><li>Click <strong>App registrations</strong> → <strong>New registration</strong></li><li>Fill in the following:</li></ol><ul><li><strong>Name:</strong> mulesoft-gov-jwt-client</li></ul><ol><li>Click <strong>Register</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwRBIFaJCKL595Es0c6N9w.png" /></figure><h3>Step 2: Capture important details</h3><p>After registration, note:</p><ul><li><strong>Application (client) ID</strong></li><li><strong>Directory (tenant) ID</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYUfpNSAurbXddan2d89cw.png" /></figure><h3>Step 3: Create a client secret</h3><ol><li>Go to <strong>Certificates &amp; secrets</strong></li><li>Click <strong>New client secret</strong></li><li>Add a description and set an expiration date</li><li>Copy the <strong>secret value</strong> immediately it won’t be shown again</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kpcgr99DDsoTY0JLHhOZyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pP3q4h6uMZVMk5Rk2euNOg.png" /></figure><h3>Step 4: Configure Application ID URI (this defines your scope)</h3><p>This step directly impacts how tokens are requested and validated.</p><ol><li>Go to your registered app</li><li>Navigate to <strong>Expose an API</strong></li><li>Click <strong>Set</strong> next to <em>Application ID URI</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqKahsxosroWz7RBc2lVYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OyiDEHKTZEjF4TPGosBKmg.png" /></figure><p>Now click overview and confirm all the Client Id, Client secret, Application ID URI are configured.</p><h3>Step 5: Get the Token url and JWKS url</h3><p>Token url:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzGfOmsqofa0prc4vb_Vtg.png" /></figure><p>JWKS uri:</p><p>copy the OpenID Connect metadata document from the endpoints list pest it on browser and search for jwks_url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBB3oqVhv90SN5seplCC1A.png" /></figure><h3>Step 6: Secure your API with JWT in MuleSoft API Manager</h3><ol><li>Go to <strong>MuleSoft API Manager</strong> and select the API you want to protect</li><li>Click <strong>Policies</strong> → <strong>Add Policy</strong> → select <strong>JWT Validation</strong></li><li>Configure the following:</li></ol><ul><li><strong>JWKS URL:</strong> https://login.microsoftonline.com/&lt;tenant-id&gt;/discovery/v2.0/keys</li><li><strong>Audience:</strong> Your <strong>Application ID URI</strong></li></ul><ol><li>Save and apply the policy</li></ol><p>The JWT validation policy will now verify every incoming token’s signature and claims before allowing access to your API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wptf7bXCUycxXYUyw_PunQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*l34ikHFoAI1Pvjp6PJFfvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*oqy5dlqqJoTq57sesUkuYA.png" /></figure><h3>Step 7: Get a JWT token from Azure</h3><p>Now we will test the JWT token generation with postman</p><p>we need the following:</p><p>Client_id, client_secret, scope: application ID URI/.default, and grant_type: client_credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*SdgaquH0XQDAkoEW4-7NMw.png" /></figure><h3>Note: JWT Token Flow</h3><p>Instead of MuleSoft acting as an OAuth provider, the flow becomes:</p><ol><li>Client authenticates with <strong>Azure (Entra ID)</strong></li><li>Azure issues a <strong>JWT access token</strong></li><li>Client calls the MuleSoft API with:</li></ol><pre>Authorization: Bearer &lt;JWT_TOKEN&gt;</pre><p>4. MuleSoft <strong>validates the JWT</strong> signature and claims</p><h3>Wrapping Up</h3><p>This pattern Azure issues the token, MuleSoft validates it, is a clean and this is the solution for OAuth limitations in MuleSoft Government Cloud. It keeps your security posture strong without requiring native OAuth provider support on the MuleSoft side.</p><p>The key pieces to get right are the <strong>Application ID URI</strong> (which defines your scope), the <strong>JWKS URL</strong> (which validates the token signature), and matching the <strong>Issuer</strong> and <strong>Audience</strong> claims in the JWT validation policy.</p><p>Bantamelak Tafete Ayalew</p><p>Email: mulebante12@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8db75a76dd37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SAML 2.0 Single Sign On (SSO) Setup Using Microsoft Azure AD as Identity Provider for MuleSoft…]]></title>
            <link>https://medium.com/@Banteamelak/saml-2-0-single-sign-on-sso-setup-using-microsoft-azure-ad-as-identity-provider-for-mulesoft-50a095cc2455?source=rss-7ef56deeb85d------2</link>
            <guid isPermaLink="false">https://medium.com/p/50a095cc2455</guid>
            <dc:creator><![CDATA[Be'ante Amelak]]></dc:creator>
            <pubDate>Sun, 25 Jan 2026 03:43:53 GMT</pubDate>
            <atom:updated>2026-05-16T23:45:05.236Z</atom:updated>
            <content:encoded><![CDATA[<h3>SAML 2.0 Single Sign On (SSO) Setup Using Microsoft Azure AD as Identity Provider for MuleSoft Anypoint platform (Bantamelak Ayalew )</h3><p>Bantamelak Tafete Ayalew.</p><p>MuleSoft Anypoint Platform supports <strong>SAML 2.0 based federated authentication</strong>, enabling seamless integration with enterprise Identity Providers such as <strong>Microsoft Azure Active</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pN36kUETg_EQFAjT7UyJ4g.png" /></figure><h3>Step 1: Create an Enterprise Application in Azure AD</h3><ol><li>Log in to <strong>Azure Portal</strong></li><li>Navigate to<br> <strong>Azure Active Directory → Enterprise Applications</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_JGK9zKPs8TyCtKtduCfA.png" /></figure><ol><li>Click <strong>New application</strong></li></ol><p>Select <strong>Create your own application</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*3Lneav9QCjyRuIosBC1QvA.png" /></figure><p>Name it: MuleSoft Anypoint SSO</p><ol><li>Choose<br> <strong>Integrate any other application you don’t find in the gallery</strong></li><li>Click <strong>Create</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vVbogU5KGzWhIYN7tZeoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUIvp35XdqkTKjs7BmO15Q.png" /></figure><h3>Step 2: Configure Single Sign-On in Azure AD</h3><ol><li>Open the newly created application</li><li>Select <strong>Single sign-on</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IcHmpJk0OLzpTHMuEgIgow.png" /></figure><ol><li>Choose <strong>SAML</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1YYXLkbKhxjHQci05twcA.png" /></figure><h3>Step 3: Configure Basic SAML Settings</h3><p>Click <strong>Edit</strong> under <strong>Basic SAML Configuration</strong> and configure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lP4zHIgXIilq4pRZLfYO3w.png" /></figure><h3>Identifier (Entity ID)</h3><p><a href="https://anypoint.mulesoft.com/">https://anypoint.mulesoft.com</a></p><h3>Reply URL (Assertion Consumer Service URL)</h3><p><a href="https://anypoint.mulesoft.com/accounts/login/saml/callback">https://anypoint.mulesoft.com/accounts/login/saml/callback</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk18eJit6xl8vDBQJhwVgA.png" /></figure><h3>Sign-on URL (Recommended)</h3><p><a href="https://anypoint.mulesoft.com/">https://anypoint.mulesoft.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vv4mcQAV4Eh81qFoiz__qg.png" /></figure><h3>Step 5: Download Azure AD Federation Metadata</h3><ol><li>Scroll to <strong>SAML Signing Certificate</strong></li><li>Download <strong>Federation Metadata XML</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mtxyhrc4-ANPbQ9gyIlttg.png" /></figure><h3>Step 6: Assign Users or Groups in Azure AD</h3><ol><li>Navigate to <strong>Users and groups</strong></li><li>Click <strong>Add user/group</strong></li><li>Assign users or Azure AD security groups</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*kAIfpsNgABk-N6S83d0QYA.png" /></figure><h3>Step 7: Configure SAML in MuleSoft Anypoint Platform</h3><ol><li>Log in to <strong>Anypoint Platform</strong></li><li>Navigate to<br> <strong>Access Management → Identity Providers</strong></li><li>Click <strong>Add Identity Provider</strong></li><li>Select <strong>SAML 2.0</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*CUDK-RnmZM8sObm-QbaItw.png" /></figure><h3>Step 8: Upload Azure AD Metadata to MuleSoft</h3><ol><li>Upload the <strong>Azure Federation Metadata XML</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11_2N4qhsLXvkSaIjQHKCw.png" /></figure><ol><li>MuleSoft auto-populates:</li><li>Identity Provider Entity ID</li></ol><ul><li>Single Sign-On URL</li><li>X.509 Certificate</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*WSOzJjmNSaZXeb6mxzE1hw.png" /></figure><h3>Step 10: Download Anypoint Service Provider Metadata</h3><ol><li>Click <strong>Download Anypoint Service Provider Metadata</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_veDnYNaOlym8X6AHck4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*FYsDgPY_FLSRai8Jain5Mg.png" /></figure><p>Save the XML file</p><h3>Step 11: Upload Anypoint Metadata Back to Azure AD (Recommended)</h3><ol><li>Return to <strong>Azure AD → Enterprise Application</strong></li><li>Edit <strong>Basic SAML Configuration</strong></li><li>Upload <strong>Anypoint SP Metadata</strong></li></ol><p>Save changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*4-0tmvoo6WW7bkCzDmp3bw.png" /></figure><h3>Step 12: Enable Federated Authentication in Anypoint</h3><ol><li>Navigate to<br> <strong>Access Management → Settings</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_veDnYNaOlym8X6AHck4g.png" /></figure><ol><li>Enable <strong>Federated Authentication</strong></li></ol><p>Select <strong>Azure-AD-SSO</strong></p><h3>Step 13: Test the SSO Login</h3><p>Open a new Incognito browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*jv1I6dQ-AXhPhXS5ARQ-Ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfIxqeTVHaIXu5unA1MGrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66fwP_ZjafEZOS9V-kHj4Q.png" /></figure><p>Configuring <strong>SAML 2.0 SSO between MuleSoft Anypoint Platform and Microsoft Azure AD</strong> enables secure, centralized authentication aligned with enterprise IAM standards.</p><p>Bantamelak Tafete Ayalew</p><p>Sr. API Architect</p><p>e @: mulebante12@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50a095cc2455" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Scheduler Driven Batch Processing Jobs in API Is Good for Large Sets of Data]]></title>
            <link>https://medium.com/@Banteamelak/why-scheduler-driven-batch-processing-jobs-in-api-is-good-for-large-sets-of-data-bantamelak-tafete-0fe8cd5535f1?source=rss-7ef56deeb85d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fe8cd5535f1</guid>
            <dc:creator><![CDATA[Be'ante Amelak]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 03:25:21 GMT</pubDate>
            <atom:updated>2026-02-13T15:50:31.216Z</atom:updated>
            <content:encoded><![CDATA[<p>Bantamelak Tafete Ayalew</p><p>When enterprises deal with <strong>millions of records</strong>, real time APIs are not always the right tool. In MuleSoft, <strong>scheduler driven batch processing jobs</strong> provide a scalable, reliable, and operationally efficient way to handle <strong>large data volumes</strong> without overwhelming systems or APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtrIV2RIGQ7XPJncAvnYyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGV0qLieRPeZFIQVwb9qpQ.png" /></figure><h3>Designed for High-Volume Processing</h3><p>MuleSoft’s Batch Job framework is purpose-built for <strong>large datasets</strong>. When triggered by a scheduler, batch jobs can:</p><ul><li>Process data in <strong>chunks</strong></li><li>Run <strong>parallel steps</strong> safely</li><li>Control memory usage</li><li>Resume processing after failures</li></ul><p>This makes them ideal for use cases such as <strong>end-of-day billing</strong>, <strong>monthly invoice generation</strong>, and <strong>financial reconciliation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_x-pDNqPSnf4lRe9b2jJqA.png" /></figure><h3>Predictable and Controlled Execution</h3><p>Scheduler driven execution allows teams to run batch jobs during <strong>off-peak hours</strong>, reducing load on source and target systems. Instead of reacting to traffic, the job runs <strong>at the right time</strong>, with full control over frequency, concurrency, and system impact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VNGeHu-6XJTlriYhDenDLQ.png" /></figure><h3>No API Overhead</h3><p>Large data processing does not require an API contract. Scheduler-based batch jobs:</p><ul><li>Do not need HTTP listeners</li><li>Do not require RAML</li><li>Avoid API gateway overhead</li><li>Reduce unnecessary governance complexity</li></ul><p>This results in <strong>simpler architecture</strong> and <strong>more stable production environments</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbcc_OzuFBOzRf-kGIBT_g.png" /></figure><h3>Built-In Fault Tolerance</h3><p>MuleSoft batch jobs support:</p><ul><li>Record-level error handling</li><li>Partial success</li><li>Retry and replay strategies</li><li>Idempotent processing</li></ul><p>Failures in individual records do not stop the entire job, which is critical when processing large datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*XNs-sVxxeOzZRhBp1dLeCw.png" /></figure><p>#MuleSoft<br> #AnypointPlatform<br> #IntegrationArchitecture<br> #EnterpriseIntegration<br> #APIIntegration#BatchProcessing<br> #SchedulerJobs<br> #DataProcessing<br> #LargeScaleData<br> #HighVolumeData#IntegrationBestPractices<br> #EnterpriseArchitecture<br> #ScalableSystems<br> #SystemDesign<br> #CloudIntegration</p><p>#ProductionReady<br> #Observability<br> #ResilientSystems<br> #IntegrationEngineering</p><p>Bantamelak Tafete Ayalew</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fe8cd5535f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Implementation Naming Standards]]></title>
            <link>https://medium.com/@Banteamelak/api-implementation-naming-standards-c0e62898b752?source=rss-7ef56deeb85d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0e62898b752</guid>
            <dc:creator><![CDATA[Be'ante Amelak]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 03:03:22 GMT</pubDate>
            <atom:updated>2026-05-16T23:40:42.236Z</atom:updated>
            <content:encoded><![CDATA[<p>API Implementation Naming Standards</p><p>I see this a lot in MuleSoft projects, and it’s something we don’t talk about enough.</p><p>Flows, subflows, error handlers, transformers every component tells a story in an end to end integration. But many times, that story gets lost because of vague names like <strong>“transform message”</strong> or <strong>“process data.”</strong> Those names don’t tell us <em>what’s actually happening</em>.</p><p>Here are some good examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G28yra_RbIMaBXX3dOBR-Q.png" /></figure><p>A component name should explain its purpose, not just its type.<br> Instead of <em>“transform message,”</em> say <strong>“MapOrderRequestToSAPFormat.”</strong><br> Instead of <em>“error handler,”</em> say <strong>“HandleOrderValidationError.”</strong></p><p>Here is another good design and flow example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2oEorOShoAsl6Y6KWV3uw.png" /></figure><p>When names are clear, you can read a flow from top to bottom and understand the logic without opening every component. Debugging becomes faster, onboarding new developers is easier, and the integration almost documents itself.</p><p>Clean naming isn’t about being perfect it’s about being kind to the next developer (which might be you).</p><p>Here are some good examples:</p><p>Example 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hzg_uVOIDSKTKmaP" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LuZN8e-bCKVBwoyz7lnh0g.png" /></figure><p>Example 4:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*wwc3JLn-psxHOxye" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*mJGkDUCt0GJvWO16J389Gg.png" /></figure><p>#APIDevelopment<br> #APIImplementation<br> #NamingStandards<br> #MuleSoft<br> #IntegrationBestPractices<br> #SoftwareEngineering<br> #CleanCode<br> #IntegrationArchitecture<br> #TechBestPractices</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0e62898b752" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Security using OAuth 2.0 with Microsoft Azure as Identity Provider. (Bantamelak Tafete Ayalew)]]></title>
            <link>https://medium.com/@Banteamelak/api-security-using-oauth-2-0-with-microsoft-azure-as-identity-provider-by-bantamelak-tafete-ayalew-f5d54a9fd855?source=rss-7ef56deeb85d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5d54a9fd855</guid>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[api-security]]></category>
            <dc:creator><![CDATA[Be'ante Amelak]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 03:15:25 GMT</pubDate>
            <atom:updated>2026-05-16T23:43:08.776Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Securing Mulesoft APIs with Azure AD and OAuth 2.0</strong></p><p>By leveraging Azure Active Directory (Azure AD) as identity provider and OAuth 2.0 as the authorization framework, we can achieve enterprise-grade security for your MuleSoft APIs.</p><p><strong>1. Register Your API in Azure AD</strong></p><p><strong>Step 1.1: Create an App Registration for Your API</strong></p><ol><li><strong>Log in to the Azure Portal</strong> and navigate to <strong>Microsoft Entra ID</strong> (formerly Azure Active Directory).</li><li>Go to <strong>App registrations</strong> and click <strong>New registration</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YhuVRCyr4ii4HcAP.jpeg" /></figure><ol><li><strong>Name your application</strong> ( “mule-dev-app”) and select the appropriate account type.</li><li><strong>Register</strong> the application.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*09uewEvAbuw4UEGK.png" /></figure><p><strong>Step 1.2: Define API Permissions and Scopes</strong></p><ol><li>In your app registration, go to <strong>API permissions</strong>.</li><li><strong>Add a permission</strong> and select <strong>Microsoft Graph</strong> or your custom API if needed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0LbE5vk6hPBcyMaL.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*W90mY3Y0VSPKX1kEJhrlHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zvm4CtyvIKIaV8BEYnxn0Q.png" /></figure><ol><li>If you are exposing a custom API, go to <strong>Expose an API</strong> and define a scope (e.g., <strong>api://&lt;app-id&gt;/access_as_user</strong>).</li><li><strong>Grant admin consent</strong> for the permissions if required.</li></ol><p><strong>Step 1.3: Create a Client Secret</strong></p><ol><li>Go to <strong>Certificates &amp; secrets</strong>.</li><li>Click <strong>New client secret</strong>.</li><li><strong>Add a description</strong> and choose an expiration date.</li><li><strong>Copy the secret value</strong> (you won’t be able to retrieve it later).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NyCqVgVqmBjFTvK8.jpeg" /></figure><p><strong>2. Configure Client Application in Azure AD</strong></p><p><strong>Step 2.1: Register a Client App</strong></p><ol><li><strong>Repeat Step 1.1</strong> to register a client application (“MuleSoft API Client”).</li><li><strong>Note the Application (client) ID</strong> and <strong>Directory (tenant) ID</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uaJ5nN18Tk3MiV6d.jpeg" /></figure><ol><li><strong>Create a client secret</strong> as in Step 1.3.</li></ol><p><strong>3. Configure Azure AD as a Client Provider in MuleSoft</strong></p><p><strong>Step 3.1: Add a New Client Provider in Anypoint Platform</strong></p><ol><li><strong>Log in to Anypoint Platform</strong>.</li><li>Go to <strong>Access Management</strong> &gt; <strong>Client Providers</strong>.</li><li><strong>Add a new client provider</strong> and select <strong>OpenID Connect DCR</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*md2Y8p-lYmA6XHJo.jpeg" /></figure><ol><li><strong>Enter the following details:</strong></li></ol><ul><li><strong>Issuer endpoint:</strong> Use the OpenID Connect metadata endpoint from Azure AD (found in the app overview &gt; Endpoints).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TbW7FbhTJLjCHkEr.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zo4wvKk2vJIrsugO.jpeg" /></figure><ul><li><strong>Client ID:</strong> From your client app registration.</li><li><strong>Client Secret:</strong> From your client app registration.</li><li><strong>Tenant ID:</strong> From your app registration.</li></ul><p><strong>4.Secure Your MuleSoft API with OAuth 2.0 Policy</strong></p><p><strong>Step 4.1: Apply OAuth 2.0 Policy in API Manager</strong></p><ol><li>In <strong>API Manager</strong>, select your API instance.</li><li>Go to <strong>Policies</strong> and add the <strong>OpenID Connect Access Token Enforcement</strong> policy.</li><li><strong>Select the Azure AD client provider</strong> you created.</li><li><strong>Configure the policy</strong> (e.g., set the required scopes and audience).</li><li><strong>Apply the policy</strong> to your API.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bQTAQ1tnE_FfzBLg.png" /></figure><p><strong>5. Test the OAuth 2.0 Flow</strong></p><p><strong>Step 5.1: Obtain an Access Token from Azure AD</strong></p><p><strong>Use a tool like Postman or cURL to request an access token:</strong></p><p>bash</p><p>curl — location — request POST ‘https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token&#39; \</p><p>— header ‘Content-Type: application/x-www-form-urlencoded’ \</p><p>— data-urlencode ‘grant_type=client_credentials’ \</p><p>— data-urlencode ‘client_id={client-id}’ \</p><p>— data-urlencode ‘client_secret={client-secret}’ \</p><p>— data-urlencode ‘scope={api-identifier}/.default’</p><p>Replace <strong>&lt;tenant-id&gt;</strong>, <strong>&lt;client-id&gt;</strong>, <strong>&lt;client-secret&gt;</strong>, and <strong>&lt;api-identifier&gt;</strong> with your values from the MuleSoft Exchange</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*86fzsYisbUZ0B-He.jpeg" /></figure><p><strong>Step 5.2: Call Your Mulesoft API</strong></p><ol><li><strong>Add the access token</strong> to the <strong>Authorization</strong> header as <strong>Bearer &lt; Access token&gt;</strong>.</li><li><strong>Call your API endpoint</strong> and verify access is granted.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RCVLwMyfpy5ZlNDI.png" /></figure><p>Summary: Secure Mulesoft APIs with Azure AD.</p><p>This approach provides several key benefits:</p><ul><li><strong>Centralized Identity Management:</strong> Azure AD serves as a single source of truth for user and application identities, simplifying user management and access control.</li><li><strong>Industry-Standard Security:</strong> OAuth 2.0 is widely adopted for API security, supporting a variety of grant types and enabling secure, delegated access to resources</li><li><strong>Scalability and Compliance:</strong> Integrating with Azure AD allows you to leverage existing security investments, enforce fine-grained permissions, and meet regulatory requirements with ease</li></ul><p>To summarize the process:</p><ol><li><strong>Register Your API in Azure AD:</strong></li></ol><ul><li>Create an app registration for your API, define permissions and scopes, and generate a client secret. This establishes your API as a protected resource in Azure AD.</li></ul><ol><li><strong>Register and Configure a Client Application:</strong></li></ol><ul><li>Create a separate app registration for client applications, grant them the necessary permissions, and generate client credentials. This ensures only authorized clients can request access tokens.</li></ul><ol><li><strong>Configure Azure AD as a Client Provider in MuleSoft:</strong></li></ol><ul><li>In Anypoint Platform, add Azure AD as a client provider using the OpenID Connect DCR option. Assign the provider to your environment to enable Azure AD-based authentication for APIs</li></ul><ol><li><strong>Secure Your MuleSoft API with OAuth 2.0 Policy:</strong></li></ol><ul><li>Apply the “OpenID Connect Access Token Enforcement” policy to your API in API Manager. This policy validates incoming tokens and enforces access control based on Azure AD authentication2.</li></ul><ol><li><strong>Test the OAuth 2.0 Flow:</strong></li></ol><ul><li>Use tools like Postman or cURL to obtain an access token from Azure AD and call your secured API. Verify that only valid tokens grant access, and troubleshoot common issues such as incorrect scopes or missing permissions.</li></ul><p>Troubleshooting and Best Practices</p><ul><li><strong>Incorrect Scope:</strong> Always ensure the scope in your token request matches the API you want to access. For custom APIs, use <strong>api://&lt;app-id&gt;/.default</strong>.</li><li><strong>Missing Permissions:</strong> Double-check that your client app has the correct API permissions and that admin consent has been granted.</li><li><strong>Token Validation:</strong> Make sure your API validates the audience claim in the token to prevent unauthorized access.</li><li><strong>Token Endpoint:</strong> Use the correct Azure AD token endpoint: <strong>https://login.microsoftonline.com/&lt;tenant-id&gt;/oauth2/v2.0/token</strong>.</li></ul><p>Additionally, follow these best practices for API security and governance:</p><ul><li><strong>Enforce HTTPS:</strong> Always secure API endpoints with HTTPS to protect data in transit.</li><li><strong>Rotate Secrets Regularly:</strong> Periodically update client secrets to minimize the risk of compromise.</li><li><strong>Monitor and Audit:</strong> Use logging and monitoring tools to track API usage and detect anomalies.</li><li><strong>Implement Rate Limiting:</strong> Protect your APIs from abuse by enforcing rate limits.</li><li><strong>Version Your APIs:</strong> Use API versioning to manage changes and ensure backward compatibility.</li></ul><p>Conclusion</p><p>Securing Mulesoft APIs with Azure AD and OAuth 2.0 is a powerful, enterprise-ready solution for modern integration scenarios. By following the steps outlined in this guide, you can centralize authentication, enforce fine-grained access control, and simplify compliance. Whether you’re building internal integrations or exposing APIs to external partners, this approach provides the security, flexibility, and scalability needed to succeed in today’s digital ecosystem.</p><h3>Bantamelak Tafete Ayalew</h3><p>Sr. API Architect</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5d54a9fd855" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>