For SharePoint Online, the Audience (i.e. “resource/app URI”) must be the SharePoint‐sites endpoint itself – not the REST URL. In other words, if your tenant is contoso.onmicrosoft.com
, set Audience to:
arduino
Copy
https://contoso.sharepoint.com
(or, when using the v2.0 endpoint, you can use https://contoso.sharepoint.com/.default
as your scope).
Why this works this way.
- The HTTP connector’s Audience field is the AAD “resource” (also known as the AppID URI) you’re requesting a token for.
If you put the full REST path (e.g. https://contoso.sharepoint.com/_api/web/lists
), AAD tries to find an app registration with that exact AppID URI – which doesn’t exist, hence the AADSTS500011
error.
By using https://<tenant>.sharepoint.com
(or https://<tenant>.sharepoint.com/.default
for v2), you tell Azure AD “give me an OAuth token that’s valid to call any SharePoint Online REST API under that site.”
Example Configuration
Authority
arduino
Copy
https://login.microsoftonline.com/{YourTenantID-or-TenantDomain}
Tenant
scss
Copy
contoso.onmicrosoft.com (or your Tenant ID GUID)
Audience
arduino
Copy
https://contoso.sharepoint.com
– or (for v2)
arduino
Copy
https://contoso.sharepoint.com/.default
Client ID – Your service principal’s Application (client) ID
Credential type – Secret
Secret – The client secret for your SPN
With that setup, when the Logic App does its “AD OAuth” handshake, it will request a token from AAD for the resource https://contoso.sharepoint.com
. Once you have that token, you can point your HTTP action at any SharePoint REST endpoint (e.g. https://contoso.sharepoint.com/_api/web/lists
) and the call will succeed.For SharePoint Online, the Audience (i.e. “resource/app URI”) must be the SharePoint‐sites endpoint itself – not the REST URL. In other words, if your tenant is contoso.onmicrosoft.com
, set Audience to:
arduino
Copy
https:
(or, when using the v2.0 endpoint, you can use https://contoso.sharepoint.com/.default
as your scope).
Why this works
The HTTP connector’s Audience field is the AAD “resource” (also known as the AppID URI) you’re requesting a token for.
If you put the full REST path (e.g. https://contoso.sharepoint.com/_api/web/lists
), AAD tries to find an app registration with that exact AppID URI – which doesn’t exist, hence the AADSTS500011
error.
By using https://<tenant>.sharepoint.com
(or https://<tenant>.sharepoint.com/.default
for v2), you tell Azure AD “give me an OAuth token that’s valid to call any SharePoint Online REST API under that site.”
Example Configuration
Authority
arduino
Copy
https:
Tenant
scss
Copy
contoso
Audience
arduino
Copy
https:
– or (for v2)
arduino
Copy
https:
Client ID
– Your service principal’s Application (client) ID
Credential type
– Secret
Secret
– The client secret for your SPN
With that setup, when the Logic App does its “AD OAuth” handshake, it will request a token from AAD for the resource https://contoso.sharepoint.com
. Once you have that token, you can point your HTTP action at any SharePoint REST endpoint (e.g. https://contoso.sharepoint.com/_api/web/lists
) and the call will succeed.