Hi @Vipul Singh ,
Thanks for reaching out.
Usually this error occurs when an invalid AAD token is used for authentication. Also please check if AAD account used in the data source credential of AAS has MFA enabled? If you would like to use Oauth2 authentication from AAS to Azure synapse, please try to use a normal AAD account which does not have MFA or location control constraints as those accounts would have limitations to retrieve access token once the previous access token expires.
Regarding Azure AD account (Oauth):
This will specify the Azure AD access token and refresh token (and some other properties) on the connection string.
The Azure AD access token is valid for one hour, after this the AS engine uses the refresh token to request a new access token which will than be used to login to Azure SQL DB
So other possibility could be access token couldn’t be refreshed.
Possible reasons for this may be:
- There was no refresh token specified, this may happen if the connection was updated but didn’t also include a valid refresh token
- The refresh token was expired, refresh tokens are valid for 90 days, unlikely but if the connection wasn’t update in the last 90 days this may happen.
- Some issue on Azure AD side to refresh the token (eg Azure AD conditional access rules, ...)
Hope this info helps. Do let us know how it goes.
Please don’t forget to
Accept Answer and
Up-Vote wherever the information provided helps you, this can be beneficial to other community members.