Hi A C (BI) ,
Welcome to Microsoft Q&A platform and thanks for posting your query here.
It seems that the error you're encountering might be due to the issue with the format of the Authorization
header. The key issue is the access token being passed dynamically, but it’s not properly formatted within the Bearer
token in the header.
The error message indicates that there’s an issue with the token string, particularly missing or misplaced parts of the Authorization
header format:
- Ensure that the
Authorization
header is in the format:
Authorization: Bearer <access_token>
- Check the dataset parameters where the access token is passed to ensure that the token is correctly retrieved and concatenated with the
Bearer
prefix. - If you're using dynamic content, ensure the expression generating the header looks like this:
@concat('Bearer ', dataset().accessToken)
This will concatenate the "Bearer " prefix with the actual token.
- Verify that the access token is valid, unexpired, and correctly obtained before the request is made.
- Please ensure all the permissions are in place to access the REST API.
Hope it helps. Kindly let us know how it goes.