microsoft / microsoft/sql-server-samples
How to create SQL external user for an app registration in another tenant?
Open
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
I have the following:
- Azure App Services in Tenant A
- Azure SQL Server in Tenant A
- Azure App/Enterprise Registration in Tenant B
How can I execute this code on my Azure SQL server to grant access to the app registration which sits in Tenant B?
CREATE USER [tenant_b_app_reg] FROM EXTERNAL PROVIDER;
EXEC sp_addrolemember [db_datareader], [tenant_b_app_reg];
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides no repository file or test to start from. Review the CREATE USER FROM EXTERNAL PROVIDER and sp_addrolemember statements together with the Tenant A and Tenant B setup, then document the supported cross-tenant procedure and prerequisites. Done means the steps let a reader grant the external app registration access on Azure SQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, sql
- Domain
- authentication, cloud, databases
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100