title: Application with AAD App Id is not authorized to generate notifications about [...] to the recipient
body: <p>Good morning,
  I'm trying to use the Microsoft graph's API to send notifications in Microsoft Teams feed.</p>
  <p>I've created a C# APP and gave all Authorization following the official Guide:
  <a href="https://docs.microsoft.com/en-us/graph/api/userteamwork-sendactivitynotification?view=graph-rest-beta&amp;tabs=http" rel="nofollow noreferrer">Here</a></p>
  <p>But I couldn't get the things done. So I've chosen to make things a little bit easier by cutting out the whole C# App using only Postman. The result is that I get the same error...</p>
  <p><strong>(ATTEMPT 1 WITH POSTMAN)</strong> -&gt; This is the body of my request:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;topic&quot;: {
          &quot;source&quot;: &quot;entityUrl&quot;,
          &quot;value&quot;: &quot;https://graph.microsoft.com/beta/users/{MY_USER_ID}/teamwork/installedApps/{APP_ID}&quot;
      },
      &quot;activityType&quot;: &quot;taskCreated&quot;,
      &quot;previewText&quot;: {
          &quot;content&quot;: &quot;New Task Created&quot;
      },
      &quot;templateParameters&quot;: [
          {
              &quot;name&quot;: &quot;taskId&quot;,
              &quot;value&quot;: &quot;Task 12322&quot;
          }
      ]
  }
  </code></pre>
  <p>This is my call:</p>
  <pre><code>https://graph.microsoft.com:443/beta/users/{MY_USER_ID}/teamwork/microsoft.graph.sendActivityNotification
  </code></pre>
  <p>As result I get this:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;error&quot;: {
          &quot;code&quot;: &quot;Forbidden&quot;,
          &quot;message&quot;: &quot;Application with AAD App Id '{APP_ID}' is not authorized to generate notifications about 'https://graph.microsoft.com/beta/users/{MY_USER_ID}/teamwork/installedApps/{APP_ID}' to the recipient.&quot;,
          &quot;innerError&quot;: {
              &quot;date&quot;: &quot;{date}&quot;,
              &quot;request-id&quot;: &quot;{request-id}&quot;,
              &quot;client-request-id&quot;: &quot;{client-request-id}&quot;
          }
      }
  }
  </code></pre>
  <p><strong>(ATTEMPT 2 WITH POSTMAN)</strong> -&gt; This is the body of my request (which is the same as the 1st one):</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;topic&quot;: {
          &quot;source&quot;: &quot;entityUrl&quot;,
          &quot;value&quot;: &quot;https://graph.microsoft.com/beta/users/{MY_USER_ID}/teamwork/installedApps/{APP_ID}&quot;
      },
      &quot;activityType&quot;: &quot;taskCreated&quot;,
      &quot;previewText&quot;: {
          &quot;content&quot;: &quot;New Task Created&quot;
      },
      &quot;templateParameters&quot;: [
          {
              &quot;name&quot;: &quot;taskId&quot;,
              &quot;value&quot;: &quot;Task 12322&quot;
          }
      ]
  }
  </code></pre>
  <p>This is my call (the things which change):</p>
  <pre><code>https://graph.microsoft.com/beta/users/{MY_USER_ID}/teamwork/installedApps/{APP_ID}
  </code></pre>
  <p>and this is the error:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;error&quot;: {
          &quot;code&quot;: &quot;UnknownError&quot;,
          &quot;message&quot;: &quot;&quot;,
          &quot;innerError&quot;: {
              &quot;date&quot;: &quot;{date}&quot;,
              &quot;request-id&quot;: &quot;{request-id}&quot;,
              &quot;client-request-id&quot;: &quot;{client-request-id}&quot;
          }
      }
  }
  </code></pre>
  <p>I think the right call is the first one, but I'm not sure...
  I've already given the permission required by the guide I've linked above (TeamsActivity.Send 'delegated' and TeamsActivity.Send 'application').</p>
  <p>I'm sure I'm missing something but from <a href="https://developer.microsoft.com/en-us/graph/graph-explorer" rel="nofollow noreferrer">GraphExplorer</a> I can't even test the right call/understand which permission I'm missing</p>
  <p>Thanks in advance,
  Giovanni</p>
  <p><strong>---------EDIT 1---------</strong></p>
  <p>As requested by Carl Zhao here my Access token, I had to censor some data but I think It will readable in the same way:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;typ&quot;: &quot;JWT&quot;,
      &quot;nonce&quot;: &quot;FHxXnlAuHU14c4czPflNLrniH-4d-4ZdRNawgEx6LQg&quot;,
      &quot;alg&quot;: &quot;RS256&quot;,
      &quot;x5t&quot;: &quot;nOo3ZDrODXEK1jKWhXslHR_KXEg&quot;,
      &quot;kid&quot;: &quot;nOo3ZDrODXEK1jKWhXslHR_KXEg&quot;
  }.{
      &quot;aud&quot;: &quot;00000003-0000-0000-c000-000000000000&quot;,
      &quot;iss&quot;: &quot;https://sts.windows.net/9e892716-96e0-4bf4-a58a-e43212bfab33/&quot;,
      &quot;iat&quot;: 1614156685,
      &quot;nbf&quot;: 1614156685,
      &quot;exp&quot;: 1614160585,
      &quot;acct&quot;: 0,
      &quot;acr&quot;: &quot;1&quot;,
      &quot;acrs&quot;: [
          &quot;urn:user:registersecurityinfo&quot;,
          &quot;urn:microsoft:req1&quot;,
          &quot;urn:microsoft:req2&quot;,
          &quot;urn:microsoft:req3&quot;,
          &quot;c1&quot;,
          &quot;c2&quot;,
          &quot;c3&quot;,
          &quot;c4&quot;,
          &quot;c5&quot;,
          &quot;c6&quot;,
          &quot;c7&quot;,
          &quot;c8&quot;,
          &quot;c9&quot;,
          &quot;c10&quot;,
          &quot;c11&quot;,
          &quot;c12&quot;,
          &quot;c13&quot;,
          &quot;c14&quot;,
          &quot;c15&quot;,
          &quot;c16&quot;,
          &quot;c17&quot;,
          &quot;c18&quot;,
          &quot;c19&quot;,
          &quot;c20&quot;,
          &quot;c21&quot;,
          &quot;c22&quot;,
          &quot;c23&quot;,
          &quot;c24&quot;,
          &quot;c25&quot;
      ],
      &quot;aio&quot;: &quot;E2ZgYBBXWFm5tc8nMm5J68RHD6qmJ31f8GpGeqzcg8/+XlvTE40B&quot;,
      &quot;amr&quot;: [
          &quot;pwd&quot;
      ],
      &quot;app_displayname&quot;: &quot;NotificationSender&quot;,
      &quot;appid&quot;: &quot;{APP_ID}&quot;,
      &quot;appidacr&quot;: &quot;0&quot;,
      &quot;family_name&quot;: &quot;{My_surname}&quot;,
      &quot;given_name&quot;: &quot;{My_name}&quot;,
      &quot;idtyp&quot;: &quot;user&quot;,
      &quot;ipaddr&quot;: &quot;{IP}&quot;,
      &quot;name&quot;: &quot;{My_surname} {My_name}&quot;,
      &quot;oid&quot;: &quot;{MY_USER_ID}&quot;,
      &quot;platf&quot;: &quot;14&quot;,
      &quot;puid&quot;: &quot;10032001002D8362&quot;,
      &quot;rh&quot;: &quot;0.AREAFieJnuCW9EuliuQyEr-rM44Tv1nRFotKsOAymqy2XUwRALk.&quot;,
      &quot;scp&quot;: &quot;email IdentityProvider.Read.All IdentityProvider.ReadWrite.All IdentityRiskEvent.Read.All IdentityRiskEvent.ReadWrite.All IdentityRiskyUser.Read.All IdentityRiskyUser.ReadWrite.All IdentityUserFlow.Read.All IdentityUserFlow.ReadWrite.All Notifications.ReadWrite.CreatedByApp openid profile TeamsActivity.Read TeamsActivity.Send TeamsApp.ReadWrite User.Read User.ReadBasic.All UserNotification.ReadWrite.CreatedByApp&quot;,
      &quot;sub&quot;: &quot;EmlIIgfTtCx92uXpG26JS3A4s30BF-L_q08y7WpK45g&quot;,
      &quot;tenant_region_scope&quot;: &quot;EU&quot;,
      &quot;tid&quot;: &quot;9e892716-96e0-4bf4-a58a-e43212bfab33&quot;,
      &quot;unique_name&quot;: &quot;{My_Mail}&quot;,
      &quot;upn&quot;: &quot;{My_Mail}&quot;,
      &quot;uti&quot;: &quot;hfEx4TU7lEOdFnLyO38VAA&quot;,
      &quot;ver&quot;: &quot;1.0&quot;,
      &quot;wids&quot;: [
          &quot;7be44c8a-adaf-4e2a-84d6-ab2649e08a13&quot;,
          &quot;158c047a-c907-4556-b7ef-446551a6b5f7&quot;,
          &quot;baf37b3a-610e-45da-9e62-d9d1e5e8914b&quot;,
          &quot;c4e39bd9-1100-46d3-8c65-fb160da0071f&quot;,
          &quot;9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3&quot;,
          &quot;b79fbf4d-3ef9-4689-8143-76b194e85509&quot;
      ],
      &quot;xms_st&quot;: {
          &quot;sub&quot;: &quot;xFCFf1A82XccwsRgTd7olVqOBVUE9pZ5d6QDyWjbojc&quot;
      },
      &quot;xms_tcdt&quot;: 1428499913
  }.[Signature]
  </code></pre>