{"id":3201,"date":"2025-12-10T14:44:45","date_gmt":"2025-12-10T13:44:45","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=3201"},"modified":"2025-12-11T14:48:48","modified_gmt":"2025-12-11T13:48:48","slug":"oauth2-microsoft-identity-platform-magic-xpi","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/","title":{"rendered":"Microsoft Identity Platform &#8211; Magic xpi"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\/ Sign on your azure portal and register an application.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"510\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG1-1024x510.png\" alt=\"\" class=\"wp-image-3204\" style=\"aspect-ratio:2.0079355352656414;width:649px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG1-1024x510.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG1-300x150.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG1-768x383.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG1.png 1507w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Register a New app with these information for example \u00ab\u00a0MyOauth2App2App\u00a0\u00bb (no need to define a Redirect URIs)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"910\" height=\"947\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG5.png\" alt=\"\" class=\"wp-image-3210\" style=\"aspect-ratio:0.9609451053508671;width:358px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG5.png 910w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG5-288x300.png 288w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG5-768x799.png 768w\" sizes=\"auto, (max-width: 910px) 100vw, 910px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on App roles and create an app role<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6-1024x548.png\" alt=\"\" class=\"wp-image-3212\" style=\"aspect-ratio:1.868637905962191;width:648px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6-1024x548.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6-300x160.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6-768x411.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6-1536x821.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG6.png 1741w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on API Permissions and remove Microsoft Graph (User.Read)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"436\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7-1024x436.png\" alt=\"\" class=\"wp-image-3214\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7-1024x436.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7-300x128.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7-768x327.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7-1536x653.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG7.png 1540w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on Add a permission and choose your API and app role<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8-1024x395.png\" alt=\"\" class=\"wp-image-3216\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8-1024x395.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8-300x116.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8-768x296.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8-1536x592.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG8.png 1836w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9-1024x554.png\" alt=\"\" class=\"wp-image-3217\" style=\"aspect-ratio:1.8483993794951348;width:806px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9-1024x554.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9-300x162.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9-768x416.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9-1536x831.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG9.png 1728w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Grant admin consent<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG10-1024x545.png\" alt=\"\" class=\"wp-image-3219\" style=\"aspect-ratio:1.8789781524169964;width:750px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG10-1024x545.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG10-300x160.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG10-768x408.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG10.png 1397w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on Expose an API and add a scope, keep the value and Click Save and continue<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13-1024x559.png\" alt=\"\" class=\"wp-image-3221\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13-1024x559.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13-300x164.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13-768x419.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13-1536x838.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG13.png 1725w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Set the scope name, admin consent display name and description then click Add scope<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14-1024x559.png\" alt=\"\" class=\"wp-image-3223\" style=\"aspect-ratio:1.831865828092243;width:691px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14-1024x559.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14-300x164.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14-768x419.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14-1536x838.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG14.png 1717w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on certificates and secrets and create a new secret and keep your secret in a safe place.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG11-1024x676.png\" alt=\"\" class=\"wp-image-3225\" style=\"aspect-ratio:1.514804798557659;width:693px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG11-1024x676.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG11-300x198.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG11-768x507.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG11.png 1030w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on Overview =&gt;Endpoints and copy the token v2 URL, your client id and tenant id<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"377\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1-1024x377.png\" alt=\"\" class=\"wp-image-3230\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1-1024x377.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1-300x110.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1-768x283.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1-1536x565.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG12-1.png 1886w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2\/ Check with Postman that you can get an access token like below<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">make a POST on your token URL and pass in the body (clientid, client secret, grant type and scope) in urlencoded format<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the scope with :  api\/\/&lt;yourclientid&gt;\/.default<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"456\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG15-1024x456.png\" alt=\"\" class=\"wp-image-3231\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG15-1024x456.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG15-300x134.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG15-768x342.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG15.png 1463w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3\/ Check in the token that you get \u00ab\u00a0RoleREST\u00a0\u00bb (roles) and the issuer (iss)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use : https:\/\/www.jwt.io<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"641\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG16-1024x641.png\" alt=\"\" class=\"wp-image-3234\" style=\"aspect-ratio:1.5975184652512004;width:752px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG16-1024x641.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG16-300x188.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG16-768x480.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG16.png 1266w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4\/ Create an xpi project and create a RESTFul API service like below<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(*) In my example, i use 6443 for the apache\/tomcat port (can be change in the server.xml file in the apache conf directory)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create GetTime path<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"700\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG17.png\" alt=\"\" class=\"wp-image-3235\" style=\"width:564px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG17.png 1020w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG17-300x206.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG17-768x527.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">5\/ Create a new flow and use a RESTFul API connector  in the trigger area<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"763\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG18-1024x763.png\" alt=\"\" class=\"wp-image-3236\" style=\"aspect-ratio:1.3420777784604043;width:530px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG18-1024x763.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG18-300x224.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG18-768x572.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG18.png 1051w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the last step use a Flow Data to, update C.userblob variable with a simple json containing the time (&lsquo;{\u00ab\u00a0time\u00a0\u00bb:\u00a0\u00bb&lsquo;&amp;TStr (Time (),&rsquo;HH:MM:SS&rsquo;)&amp;'\u00a0\u00bb}&rsquo;) and C.usercode with 201.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6\/ Open the XML service definition file of your RESTFul service  under your project directory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(ex : &lt;Magicxpi installation directory&gt;Runtime\\projects\\OAuth2_Keycloak\\OAuth2_Keycloak\\RESTful API\\MyRESTfulAPI)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"203\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG19.png\" alt=\"\" class=\"wp-image-3238\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG19.png 673w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG19-300x90.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Add the oauth2 resource server in the securityDefinitions<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the iss value from the token (step 3) for the issuerUri for the tag &lt;resourceServer><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add a security role (\u00ab\u00a0RoleREST\u00a0\u00bb) (step 3) for the endpoint you want to protect for the tag &lt;security><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20-1024x333.png\" alt=\"\" class=\"wp-image-3240\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20-1024x333.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20-300x98.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20-768x250.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20-1536x500.png 1536w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG20.png 1589w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">7\/ Copy the war file (<strong>xpiREST.war<\/strong>) from your installation directory (ex: <strong>&lt;Magicxpi installation directory>\\Runtime\\addon_connectors\\RESTfulAPI\\servicefiles<\/strong> to your webapps apache directory (ex: <strong>&lt;Magicxpi installation directory>\\Runtime\\apache-tomcat\\webapps<\/strong>)<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>!! Use the last version of the war file<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8\/ Start your apache server (startup.bat) from your apache directory (ex : &lt;Magicxpi installation directory&gt;\\Runtime\\apache-tomcat\\bin) using command line (Admin mode)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">9\/ Copy the service definition file from step6 to directory \u00ab\u00a0rest-services\u00a0\u00bb  of your apache\/tomcat <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"156\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG21.png\" alt=\"\" class=\"wp-image-3242\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG21.png 683w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG21-300x69.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">10\/ Start your magic xpi project<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">11\/ Use Postman to call Magic xpi service and use the bearer token you got from step 2\/ <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the Authorization header with the Bearer token<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"430\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG22-1024x430.png\" alt=\"\" class=\"wp-image-3244\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG22-1024x430.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG22-300x126.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG22-768x322.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG22.png 1289w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You should receive status 201 with the time value<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">12\/ Set a wrong role in the service definition file in your apache directory<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"963\" height=\"575\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG23.png\" alt=\"\" class=\"wp-image-3245\" style=\"aspect-ratio:1.6748464590466874;width:590px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG23.png 963w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG23-300x179.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG23-768x459.png 768w\" sizes=\"auto, (max-width: 963px) 100vw, 963px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you call again the service, you should get error status 403 Forbidden<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"435\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG24-1024x435.png\" alt=\"\" class=\"wp-image-3246\" style=\"aspect-ratio:2.354156189381421;width:782px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG24-1024x435.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG24-300x128.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG24-768x326.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG24.png 1275w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example \u00ab\u00a0MyOauth2App2App\u00a0\u00bb (no need to define a Redirect URIs) Click on App roles and create an app role Click on API [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3250,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[31,4,28,88,27],"tags":[11,14],"class_list":["post-3201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-magic-xpi","category-microsoft","category-microsoft-identity-platform","category-oauth2","tag-azure","tag-magic-xpi"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example &quot;MyOauth2App2App&quot; (no need to define a Redirect URIs) Click on App roles and create an app role Click on API\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sa\u00e2d Alem\"\/>\n\t<meta name=\"google-site-verification\" content=\"5yLZLt_RgZVqkETQDrOlMUHaNTra2i5W8dtHQoCMueY\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"fr_FR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Le Blog Techno | Magic Software France\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno\" \/>\n\t\t<meta property=\"og:description\" content=\"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example &quot;MyOauth2App2App&quot; (no need to define a Redirect URIs) Click on App roles and create an app role Click on API\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<meta property=\"og:image:width\" content=\"16\" \/>\n\t\t<meta property=\"og:image:height\" content=\"16\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-12-10T13:44:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-12-11T13:48:48+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagicSoftwareEnterprises\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@MagicSoftware\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example &quot;MyOauth2App2App&quot; (no need to define a Redirect URIs) Click on App roles and create an app role Click on API\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@MagicSoftware\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#blogposting\",\"name\":\"Microsoft Identity Platform \\u2013 Magic xpi | Le Blog Techno\",\"headline\":\"Microsoft Identity Platform &#8211; Magic xpi\",\"author\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/AZ_OAUTH2_MG25.png\",\"width\":389,\"height\":111},\"datePublished\":\"2025-12-10T14:44:45+01:00\",\"dateModified\":\"2025-12-11T14:48:48+01:00\",\"inLanguage\":\"fr-FR\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#webpage\"},\"articleSection\":\"Azure, Magic xpi, Microsoft, Microsoft Identity Platform, OAuth2, Azure, Magic xpi\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog#listItem\",\"position\":1,\"name\":\"Domicile\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"name\":\"Magic xpi\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"position\":2,\"name\":\"Magic xpi\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/#listItem\",\"name\":\"Microsoft\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog#listItem\",\"name\":\"Domicile\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/#listItem\",\"position\":3,\"name\":\"Microsoft\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/#listItem\",\"name\":\"Azure\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/#listItem\",\"name\":\"Magic xpi\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/#listItem\",\"position\":4,\"name\":\"Azure\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/microsoft-identity-platform\\\/#listItem\",\"name\":\"Microsoft Identity Platform\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/#listItem\",\"name\":\"Microsoft\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/microsoft-identity-platform\\\/#listItem\",\"position\":5,\"name\":\"Microsoft Identity Platform\",\"item\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/microsoft-identity-platform\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#listItem\",\"name\":\"Microsoft Identity Platform &#8211; Magic xpi\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/#listItem\",\"name\":\"Azure\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#listItem\",\"position\":6,\"name\":\"Microsoft Identity Platform &#8211; Magic xpi\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/category\\\/magic-xpi\\\/microsoft\\\/azure\\\/microsoft-identity-platform\\\/#listItem\",\"name\":\"Microsoft Identity Platform\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\",\"name\":\"Blog Magic France\",\"description\":\"Magic Software France\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/\",\"telephone\":\"+33149105858\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/Magic.ico\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#organizationLogo\",\"width\":16,\"height\":16},\"image\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/MagicSoftwareEnterprises\",\"https:\\\/\\\/twitter.com\\\/MagicSoftware\",\"https:\\\/\\\/youtube.com\\\/MagicSoftware\",\"https:\\\/\\\/linkedin.com\\\/company\\\/magic-software-enterprises\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/\",\"name\":\"Sa\\u00e2d Alem\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/38fae53569553d87ce6ffb3b936e4df6feecf6069ddb238526105d8d906273c4?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Sa\\u00e2d Alem\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#webpage\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/\",\"name\":\"Microsoft Identity Platform \\u2013 Magic xpi | Le Blog Techno\",\"description\":\"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\\\/ Sign on your azure portal and register an application. Register a New app with these information for example \\\"MyOauth2App2App\\\" (no need to define a Redirect URIs) Click on App roles and create an app role Click on API\",\"inLanguage\":\"fr-FR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/author\\\/saad\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/AZ_OAUTH2_MG25.png\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#mainImage\",\"width\":389,\"height\":111},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/magic-xpi\\\/oauth2-microsoft-identity-platform-magic-xpi\\\/#mainImage\"},\"datePublished\":\"2025-12-10T14:44:45+01:00\",\"dateModified\":\"2025-12-11T14:48:48+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/\",\"name\":\"Blog Magic France\",\"description\":\"Magic Software France\",\"inLanguage\":\"fr-FR\",\"publisher\":{\"@id\":\"https:\\\/\\\/france.magicsoftware.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno","description":"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example \"MyOauth2App2App\" (no need to define a Redirect URIs) Click on App roles and create an app role Click on API","canonical_url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"5yLZLt_RgZVqkETQDrOlMUHaNTra2i5W8dtHQoCMueY","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#blogposting","name":"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno","headline":"Microsoft Identity Platform &#8211; Magic xpi","author":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"publisher":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG25.png","width":389,"height":111},"datePublished":"2025-12-10T14:44:45+01:00","dateModified":"2025-12-11T14:48:48+01:00","inLanguage":"fr-FR","mainEntityOfPage":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#webpage"},"isPartOf":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#webpage"},"articleSection":"Azure, Magic xpi, Microsoft, Microsoft Identity Platform, OAuth2, Azure, Magic xpi"},{"@type":"BreadcrumbList","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog#listItem","position":1,"name":"Domicile","item":"https:\/\/france.magicsoftware.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","name":"Magic xpi"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","position":2,"name":"Magic xpi","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/#listItem","name":"Microsoft"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog#listItem","name":"Domicile"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/#listItem","position":3,"name":"Microsoft","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/#listItem","name":"Azure"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/#listItem","name":"Magic xpi"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/#listItem","position":4,"name":"Azure","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/#listItem","name":"Microsoft Identity Platform"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/#listItem","name":"Microsoft"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/#listItem","position":5,"name":"Microsoft Identity Platform","item":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/","nextItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#listItem","name":"Microsoft Identity Platform &#8211; Magic xpi"},"previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/#listItem","name":"Azure"}},{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#listItem","position":6,"name":"Microsoft Identity Platform &#8211; Magic xpi","previousItem":{"@type":"ListItem","@id":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/#listItem","name":"Microsoft Identity Platform"}}]},{"@type":"Organization","@id":"https:\/\/france.magicsoftware.com\/blog\/#organization","name":"Blog Magic France","description":"Magic Software France","url":"https:\/\/france.magicsoftware.com\/blog\/","telephone":"+33149105858","logo":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#organizationLogo","width":16,"height":16},"image":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/MagicSoftwareEnterprises","https:\/\/twitter.com\/MagicSoftware","https:\/\/youtube.com\/MagicSoftware","https:\/\/linkedin.com\/company\/magic-software-enterprises"]},{"@type":"Person","@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author","url":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/","name":"Sa\u00e2d Alem","image":{"@type":"ImageObject","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/38fae53569553d87ce6ffb3b936e4df6feecf6069ddb238526105d8d906273c4?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sa\u00e2d Alem"}},{"@type":"WebPage","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#webpage","url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/","name":"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno","description":"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example \"MyOauth2App2App\" (no need to define a Redirect URIs) Click on App roles and create an app role Click on API","inLanguage":"fr-FR","isPartOf":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#breadcrumblist"},"author":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"creator":{"@id":"https:\/\/france.magicsoftware.com\/blog\/author\/saad\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG25.png","@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#mainImage","width":389,"height":111},"primaryImageOfPage":{"@id":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/#mainImage"},"datePublished":"2025-12-10T14:44:45+01:00","dateModified":"2025-12-11T14:48:48+01:00"},{"@type":"WebSite","@id":"https:\/\/france.magicsoftware.com\/blog\/#website","url":"https:\/\/france.magicsoftware.com\/blog\/","name":"Blog Magic France","description":"Magic Software France","inLanguage":"fr-FR","publisher":{"@id":"https:\/\/france.magicsoftware.com\/blog\/#organization"}}]},"og:locale":"fr_FR","og:site_name":"Le Blog Techno | Magic Software France","og:type":"article","og:title":"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno","og:description":"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example &quot;MyOauth2App2App&quot; (no need to define a Redirect URIs) Click on App roles and create an app role Click on API","og:url":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/","og:image":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","og:image:secure_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico","og:image:width":16,"og:image:height":16,"article:published_time":"2025-12-10T13:44:45+00:00","article:modified_time":"2025-12-11T13:48:48+00:00","article:publisher":"https:\/\/www.facebook.com\/MagicSoftwareEnterprises","twitter:card":"summary_large_image","twitter:site":"@MagicSoftware","twitter:title":"Microsoft Identity Platform \u2013 Magic xpi | Le Blog Techno","twitter:description":"Goal : Configure OAuth2 Authentication for Magic xpi RESTful API Service using Microsoft identity platform Application2Application 1\/ Sign on your azure portal and register an application. Register a New app with these information for example &quot;MyOauth2App2App&quot; (no need to define a Redirect URIs) Click on App roles and create an app role Click on API","twitter:creator":"@MagicSoftware","twitter:image":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/Magic.ico"},"aioseo_meta_data":{"post_id":"3201","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2025-12-10 10:34:29","updated":"2025-12-11 14:04:24","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\" title=\"Domicile\">Domicile<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/\" title=\"Magic xpi\">Magic xpi<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/\" title=\"Microsoft\">Microsoft<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/\" title=\"Azure\">Azure<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/\" title=\"Microsoft Identity Platform\">Microsoft Identity Platform<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMicrosoft Identity Platform \u2013 Magic xpi\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Domicile","link":"https:\/\/france.magicsoftware.com\/blog"},{"label":"Magic xpi","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/"},{"label":"Microsoft","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/"},{"label":"Azure","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/"},{"label":"Microsoft Identity Platform","link":"https:\/\/france.magicsoftware.com\/blog\/category\/magic-xpi\/microsoft\/azure\/microsoft-identity-platform\/"},{"label":"Microsoft Identity Platform &#8211; Magic xpi","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/oauth2-microsoft-identity-platform-magic-xpi\/"}],"jetpack_featured_media_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2025\/12\/AZ_OAUTH2_MG25.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=3201"}],"version-history":[{"count":33,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3201\/revisions"}],"predecessor-version":[{"id":3284,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/3201\/revisions\/3284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/3250"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=3201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=3201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=3201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}