<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The request body must contain the following parameter: 'grant_type' in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120471#M53202</link>
    <description>&lt;P&gt;Thank you for the response I have now got it working.&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 08:48:36 GMT</pubDate>
    <dc:creator>JamesWilliams</dc:creator>
    <dc:date>2025-05-15T08:48:36Z</dc:date>
    <item>
      <title>The request body must contain the following parameter: 'grant_type'</title>
      <link>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120447#M53199</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;I am attempting to put together an API call to generate a bearer token within Blue Prism Web API Services (I am using Blue Prism v6.10.5)&lt;/P&gt;&lt;P&gt;I am struggling to get the token to authorise and get the following message:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;“Internal : Unexpected error Error during Web API HTTP Request&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTTP Status Code: 400&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HTTP Response Content: {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'grant_type'. Trace ID: 99479596-c3ae-4bb1-bcf8-e4ea321c0400 Correlation ID: f84f1d9d-e2d3-465e-a911-073a9a7c6e58 Timestamp: 2025-05-14 08:07:05Z","error_codes":[900144],"timestamp":"2025-05-14 08:07:05Z","trace_id":"99479596-c3ae-4bb1-bcf8-e4ea321c0400","correlation_id":"f84f1d9d-e2d3-465e-a911-073a9a7c6e58","error_uri":&lt;A href="https://login.microsoftonline.com/error?code=900144" target="_blank"&gt;https://login.microsoftonline.com/error?code=900144&lt;/A&gt;}”&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have got this working in Postman without issue and wondered if you could offer some support in getting it working?&lt;/P&gt;&lt;P&gt;Here is a breakdown of the settings in Postman and Blue Prism:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Postman:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_0-1747211411495.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40867i5945E95E8DDF7418/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_0-1747211411495.png" alt="JamesWilliams_0-1747211411495.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_1-1747211527825.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40868iB0C09F3A17DBF2D3/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_1-1747211527825.png" alt="JamesWilliams_1-1747211527825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In postman it’s a very easy setup and the bearer token generates without issue&lt;/P&gt;&lt;P&gt;I have tried various things in Blue Prism but this is the latest setup&lt;/P&gt;&lt;P&gt;I am passing in the Parameters (I have also tried hard coding in the Service) to the action created by the Web API Services:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_2-1747211672905.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40869i4C0E597F1B7B3D77/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_2-1747211672905.png" alt="JamesWilliams_2-1747211672905.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inside the Web API Service:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_3-1747211720515.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40871iC62F0E9E27B0F38F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_3-1747211720515.png" alt="JamesWilliams_3-1747211720515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common Headers:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_4-1747211720524.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40870i218A2E135BE6B622/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_4-1747211720524.png" alt="JamesWilliams_4-1747211720524.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common Parameters:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_5-1747211720526.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40872i1C74E8BB353766A9/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_5-1747211720526.png" alt="JamesWilliams_5-1747211720526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common Authentication: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_6-1747211720526.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40873i9DDFFE921A92E115/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_6-1747211720526.png" alt="JamesWilliams_6-1747211720526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Common Code: (this is where the issue might be, Do I have to pass anything into this?)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_7-1747211720528.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40875iAC5E664C02D2A1C1/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_7-1747211720528.png" alt="JamesWilliams_7-1747211720528.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Action:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_8-1747211720528.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40874i6AB1E7D73E6EAF8E/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_8-1747211720528.png" alt="JamesWilliams_8-1747211720528.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parameters: ( I have tried the parameters that I am passing in, in here as well as mentioned above in the common parameters. I have tried to hard code them and pass them in from the calling process)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_9-1747211720529.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40876iB1970135380F3A71/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_9-1747211720529.png" alt="JamesWilliams_9-1747211720529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Request: (I have tried adding code to the Body Content but it didn't seem to work and I got compiler errors, code I tried looked like the following?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "grant_type": "[grant_type]",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "client_id": "[client_id]",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "client_secret": "[client_secret]",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "scope": "[scope]"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also tried hard coding the values&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_10-1747211985505.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40877i1D89BE647431D4B6/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_10-1747211985505.png" alt="JamesWilliams_10-1747211985505.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Headers: (I tried adding Accept and Content Type here as well as the Common parameters above)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_11-1747212016832.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40878i6EA5FBF91227D412/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_11-1747212016832.png" alt="JamesWilliams_11-1747212016832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Response:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesWilliams_12-1747212016833.png" style="width: 400px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/40879i9D5C9B02BC6AA640/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="JamesWilliams_12-1747212016833.png" alt="JamesWilliams_12-1747212016833.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 08:41:42 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120447#M53199</guid>
      <dc:creator>JamesWilliams</dc:creator>
      <dc:date>2025-05-14T08:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: The request body must contain the following parameter: 'grant_type'</title>
      <link>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120454#M53201</link>
      <description>&lt;P&gt;In the Generate Bearer Token Action:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Under Request &amp;gt; Headers, add a new header:&lt;BR /&gt;Name: Content-Type&lt;BR /&gt;Value: application/x-www-form-urlencoded&lt;/LI&gt;&lt;LI&gt;Under Request &amp;gt; Body, set:&lt;BR /&gt;Body Type: Text&lt;BR /&gt;Body Content Type: application/x-www-form-urlencoded&lt;BR /&gt;Body Content (Template):&lt;BR /&gt;grant_type=client_credentials&amp;amp;client_id=[Client_Id]&amp;amp;client_secret=[Client_Secret]&amp;amp;scope=[Scope]&lt;BR /&gt;Ensure [Client_Id], [Client_Secret], and [Scope] are defined as input parameters and passed in from the calling process.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 14 May 2025 12:15:38 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120454#M53201</guid>
      <dc:creator>Chakkravarthi_PR</dc:creator>
      <dc:date>2025-05-14T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: The request body must contain the following parameter: 'grant_type'</title>
      <link>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120471#M53202</link>
      <description>&lt;P&gt;Thank you for the response I have now got it working.&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 08:48:36 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/The-request-body-must-contain-the-following-parameter-grant-type/m-p/120471#M53202</guid>
      <dc:creator>JamesWilliams</dc:creator>
      <dc:date>2025-05-15T08:48:36Z</dc:date>
    </item>
  </channel>
</rss>

