Azure / Azure/azure-rest-api-specs

Synapses Data Plane API Audience should remove Trailing

Open
#10,500 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question Service Attention Synapses
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 21h
Merged PRs (30d)
432

Description

Am not exactly sure that this is a bug in the code itself or docs need to be updated. Either way, I'm creating this issue for both the case

Data Plane APIs Synapses Audience need to remove extra /

As per the below docs

Set the Authorization header to a JSON Web Token that you obtain from Azure Active Directory. For data-plane operations, be sure to obtain a token for the resource URI / audience claim "https://dev.azuresynapse.net/", NOT "https://management.core.windows.net/" nor "https://management.azure.com/". For more information, see Acquire an access token.

From the above statement has the audience claim https://dev.azuresynapse.net/ is not working, and will give an error like

{
    "code": "InvalidTokenAuthenticationAudience",
    "message": "Token Authentication failed with SecurityTokenInvalidAudienceException - IDX10214: Audience validation failed. Audiences: '[PII is hidden]'. Did not match: validationParameters.ValidAudience: '[PII is hidden]' or validationParameters.ValidAudiences: '[PII is hidden]'."
}

But once we removed the trailing slash at the end of the URL (/) which will be https://dev.azuresynapse.net then the APIs are working.

Please make necessary fix either in the docs or the API

Reference: https://docs.microsoft.com/en-us/rest/api/synapse/?source=docs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Synapse REST documentation and locate the Synapse audience definition in this repository's specifications. Compare the documented trailing-slash audience with the value accepted by the data-plane APIs; done means either the specification/API behavior and documentation consistently use the working audience, or the discrepancy is documented as unresolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.