{"id":6003,"date":"2022-08-14T07:14:46","date_gmt":"2022-08-14T07:14:46","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=6003"},"modified":"2022-08-14T07:14:46","modified_gmt":"2022-08-14T07:14:46","slug":"add-user-to-azure-sql-db-and-assign-permissions","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/azure\/add-user-to-azure-sql-db-and-assign-permissions","title":{"rendered":"Add User to Azure SQL DB and Assign permissions"},"content":{"rendered":"<p>How to assign User Connect Permissions to Azure DB<\/p><p>[pastacode lang=&#8221;sql&#8221; manual=&#8221;CREATE%20USER%20%5Bemail%40domain.com%5D%20FROM%20EXTERNAL%20PROVIDER%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p><p>How to find current Roles assigned to Azure DB<\/p><p>[pastacode lang=&#8221;sql&#8221; manual=&#8221;SELECT%20DISTINCT%20pr.principal_id%2C%20pr.name%2C%20pr.type_desc%2C%20%0A%20%20%20%20pr.authentication_type_desc%2C%20pe.state_desc%2C%20pe.permission_name%0AFROM%20sys.database_principals%20AS%20pr%0AJOIN%20sys.database_permissions%20AS%20pe%0A%20%20%20%20ON%20pe.grantee_principal_id%20%3D%20pr.principal_id%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p><p>How to assign User Role to Azure DB<\/p><p>[pastacode lang=&#8221;sql&#8221; manual=&#8221;ALTER%20ROLE%20db_datawrite%20ADD%20MEMBER%20%5Bemail%40domain.com%5D%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p>","protected":false},"excerpt":{"rendered":"<p>How to assign User Connect Permissions to Azure DB[pastacode lang=&#8221;sql&#8221; manual=&#8221;CREATE%20USER%20%5Bemail%40domain.com%5D%20FROM%20EXTERNAL%20PROVIDER%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]How to find current Roles assigned to Azure DB[pastacode lang=&#8221;sql&#8221; manual=&#8221;SELECT%20DISTINCT%20pr.principal_id%2C%20pr.name%2C%20pr.type_desc%2C%20%0A%20%20%20%20pr.authentication_type_desc%2C%20pe.state_desc%2C%20pe.permission_name%0AFROM%20sys.database_principals%20AS%20pr%0AJOIN%20sys.database_permissions%20AS%20pe%0A%20%20%20%20ON%20pe.grantee_principal_id%20%3D%20pr.principal_id%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]How [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2092],"tags":[1464,3236,3901,591],"class_list":["post-6003","post","type-post","status-publish","format-standard","hentry","category-azure","tag-azure","tag-db","tag-managed","tag-sql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=6003"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6003\/revisions"}],"predecessor-version":[{"id":6004,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6003\/revisions\/6004"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=6003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=6003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=6003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}