Hi @lee mcragger ,
I am assuming you are developing a API which connect to Azure SQL and you want to use service principal to connect to Azure SQL from web API. if my understanding is correct please check following:
- Ensure that service principal has right access on Azure SQL Server. example to grant access to service principal to SQL
CREATE USER [SerivcePrincipalName] FROM EXTERNAL PROVIDER
EXEC sp_addrolemember 'db_reader', 'SerivcePrincipalName' - While generating token ensure that resource is set to https://database.windows.net/
I hope this helps.
Thanks,
Rahul