Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1392971%22%20slang%3D%22en-US%22%3ECustom%20RBAC%20role%20in%20Azure%20Storage%20to%20perform%20upload%20%2F%20download%20operation%20%26amp%3B%20restrict%20delete%20operation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392971%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CEM%3EScenario%3C%2FEM%3E%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3EThis%20article%20explains%20step%20by%20step%20procedure%20to%20accomplish%20the%20below%20requirement%20in%20Azure%20Storage%20using%20custom%20RBAC%20role%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ERead%20and%20write%20operation%20for%20container%20and%20blobs%20should%20be%20allowed%20for%20the%20users%3C%2FLI%3E%0A%3CLI%3EDelete%20operations%20should%20be%20restricted%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EThe%20above%20custom%20RBAC%20role%20should%20be%20assigned%20at%20the%20resource%20group%20level.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EPre-Requisites%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAzure%20Storage%20GPV2%20%2F%20ADLS%20Gen%202%20Storage%20account%3C%2FLI%3E%0A%3CLI%3EEnsure%20that%20you%20have%20enough%20permissions%20to%20create%20custom%20roles%2C%20such%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%23owner%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOwner%3C%2FA%3E%20or%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%23user-access-administrator%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUser%20Access%20Administrator%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EAction%3C%2FEM%3E%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3EYou%20could%20follow%20the%20below%20steps%20to%20create%20a%20custom%20RBAC%20role%20using%20the%20Azure%20portal.%3C%2FP%3E%0A%3CP%3EThe%20creation%20of%20custom%20RBAC%20role%20can%20be%20done%20using%20the%20below%20methods%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EUsing%20PowerShell%20%3A%20please%20refer%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Ftutorial-custom-role-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Ftutorial-custom-role-powershell%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EUsing%20AzCLI%20%3A%20please%20refer%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fcustom-roles-cli%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fcustom-roles-cli%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EUsing%20Rest%20API%20%3A%20please%20refer%20%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fcustom-roles-rest%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fcustom-roles-rest%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EStep%201%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESign-in%20to%20the%20Azure%20portal%20with%20your%20credentials%3C%2FLI%3E%0A%3CLI%3EGo%20to%20the%20resource%20group%20where%20you%20could%20like%20the%20role%20to%20be%20implemented%2F%20scoped%20to.%3C%2FLI%3E%0A%3CLI%3ESelect%20Access%20Control%20(IAM)-%26gt%3BAdd-%26gt%3B%20Add%20Custom%20Role%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_0-1589550860875.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192060i08F8602B5A762C86%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_0-1589550860875.png%22%20alt%3D%22Anisha1721_0-1589550860875.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EStep%202%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EGive%20a%20suitable%20name%20and%20description%20for%20the%20role.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_1-1589550860920.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192058i27CC16FA9C0F8E6D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_1-1589550860920.png%22%20alt%3D%22Anisha1721_1-1589550860920.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EStep%203%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20Baseline%20permission%20parameters%20helps%20with%20deciding%20whether%20you%20want%20to%20create%20your%20custom%20role%20by%20cloning%20and%20then%20modifying%20an%20existing%20role%20or%20by%20starting%20from%20scratch.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EHere%2C%20I%20would%20be%20choosing%20the%20option%20of%20%26lt%3B%3CSTRONG%3EClone%20a%20Role%3C%2FSTRONG%3E%20%26gt%3B%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ERole%20to%20clone%3C%2FSTRONG%3E%3A%20I%20would%20be%20choosing%20is%20%26lt%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%23storage-blob-data-contributor%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EStorage%20Blob%20Data%20Contributor%3C%2FA%3E%26gt%3B%20as%20it%20inclines%20more%20to%20the%20custom%20role%20that%20I%20would%20create.%20You%20could%20choose%20any%20other%20roles%20to%20clone%20as%20per%20your%20use%20case.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_2-1589550860948.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192059i29B24DB135E64255%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_2-1589550860948.png%22%20alt%3D%22Anisha1721_2-1589550860948.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EStep%204%3A%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EUnder%20the%20Permissions%20Tab%2C%20I%20would%20be%20altering%20the%20permissions%20as%20per%20my%20use%20case.%20I%20would%20be%20making%20changes%20to%20the%20below%20highlighted%20permissions%20as%20it%20aligns%20to%20my%20use%20case%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_3-1589550860999.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192063i232101A0E8B89618%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_3-1589550860999.png%22%20alt%3D%22Anisha1721_3-1589550860999.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETo%20Add%2F%20Exclude%20permissions%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EChoose%20the%20option%20either%20add%2F%20exclude%20and%20then%20you%20search%20for%20the%20resource%20you%20would%20like%20to%20assign%20the%20permission.%3C%2FLI%3E%0A%3CLI%3EAs%20I%20would%20like%20to%20exclude%20the%20permission%20for%20deletion%20operation%20at%20the%20storage%20account%2C%20I%20have%20used%20the%20below%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_4-1589550861024.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192061iAB6D93958C60AF1D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_4-1589550861024.png%22%20alt%3D%22Anisha1721_4-1589550861024.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EExcluding%20the%20required%20permissions%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EUnder%20Not%20Actions%20%3A%20This%20is%20more%20inclined%20to%20management%20plane%20permissions.%20I%20have%20chosen%20the%20below%202%20permissions%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_5-1589550861064.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192062i54EA889C4346CD0D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_5-1589550861064.png%22%20alt%3D%22Anisha1721_5-1589550861064.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EFor%20Not%20Data%20Actions%3A%20This%20is%20more%20inclined%20to%20Data%20Plane%20operations%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_6-1589550861100.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192064i1A7EE091A842CA9D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_6-1589550861100.png%22%20alt%3D%22Anisha1721_6-1589550861100.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20final%20format%20of%20the%20Custom%20RBAC%20role%20is%20as%20below%2C%20with%20scope%20at%20resource%20group%20level.%20This%20has%20been%20created%20by%20clicking%20on%20the%20create%20option%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_7-1589550861124.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192065i821B327707FB3C30%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_7-1589550861124.png%22%20alt%3D%22Anisha1721_7-1589550861124.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EStep%205%3A%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOnce%20the%20role%20has%20been%20created%20the%20role%2C%20we%20can%20assign%20it%20to%20the%20user%20as%20below%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAzure%20portal%20-%26gt%3B%20Resource%20group%3C%2FLI%3E%0A%3CLI%3EAccess%20control%20(IAM)%20-%26gt%3B%20add-%26gt%3B%20role%20assignment%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20role%20assignment%20choose%20the%20custom%20role%20you%20have%20created%20and%20assign%20it%20to%20the%20user%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_8-1589550861161.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192066iDBD2FFDE6FC14113%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_8-1589550861161.png%22%20alt%3D%22Anisha1721_8-1589550861161.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3E%26nbsp%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3EPlease%20Note%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EAlong%20with%20the%20above%20permission%2C%20I%20have%20given%20the%20user%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%23reader%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EReader%3C%2FA%3E%20permission%20at%20the%20subscription%20level.%20You%20could%20give%20the%20Reader%20permission%20at%20the%20resource%20group%20level%20too.%3C%2FP%3E%0A%3CP%3EWe%20mainly%20have%20Management%20Plane%20and%20Data%20Plane%20while%20providing%20permissions%20to%20the%20user.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20Management%20plane%20consists%20of%20operation%20related%20to%20storage%20account%20such%20as%20getting%20the%20list%20of%20storage%20accounts%20in%20a%20subscription%2C%20retrieve%20storage%20account%20keys%20or%20regenerate%20the%20storage%20account%20keys%2C%20etc.%3C%2FLI%3E%0A%3CLI%3EThe%20Data%20plane%20access%20refers%20to%20the%20access%20to%20read%2C%20write%20or%20delete%20data%20present%20inside%20the%20containers.%3C%2FLI%3E%0A%3CLI%3EFor%20more%20info%2C%20please%20refer%20to%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Frole-based-access-control%252Frole-definitions%2523management-and-data-operations%26amp%3Bdata%3D02%257C01%257CAnisha.Radhakrishnan%2540microsoft.com%257Cc35feb46edcc42a7ac4808d7b152197c%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637172838844274603%26amp%3Bsdata%3DeI9sR3dnjAQYaUQNWnuzStAEY3IXgSdMnlalAojuvYw%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Frole-definitions%23management-and-data-operations%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3ETo%20understand%20about%20the%20Built%20in%20roles%20available%20for%20Azure%20resources%2C%20please%20refer%20to%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fazure%252Frole-based-access-control%252Fbuilt-in-roles%26amp%3Bdata%3D02%257C01%257CAnisha.Radhakrishnan%2540microsoft.com%257Cc35feb46edcc42a7ac4808d7b152197c%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637172838844274603%26amp%3Bsdata%3De2mZnN8r7HW7HqZ%252FVahA1BOKiPvmgVtWXFSpbkF8qRo%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHence%2C%20it%20is%20important%20that%20you%20give%20minimum%20of%20%E2%80%98Reader%E2%80%99%20role%20at%20the%20Management%20plane%20level%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%206%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20storage%20account%20%3CTESTSTORAGE2355%3E%20was%20deployed%20under%20the%20resource%20group%20%3CCUSTOMRBAC%3E%20where%20the%20Custom%20RBAC%20role%20was%20assigned%20for%20the%20user%3C%2FCUSTOMRBAC%3E%3C%2FTESTSTORAGE2355%3E%3C%2FP%3E%0A%3CP%3EThe%20below%20operations%20were%20checked%20by%20the%20user%20to%20see%20if%20the%20RBAC%20role%20was%20working%20appropriately%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EUpload%20blobs%20to%20blob%20storage%20successfully%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_9-1589550861175.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192067iB33734C318A6EA50%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_9-1589550861175.png%22%20alt%3D%22Anisha1721_9-1589550861175.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EDownload%20blobs%20from%20blob%20storage%20successfully%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_10-1589550861191.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192068i25D485D75C908DF6%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_10-1589550861191.png%22%20alt%3D%22Anisha1721_10-1589550861191.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EDelete%20blobs%20from%20blob%20storage%20causing%20the%20below%20failures%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_11-1589550861205.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192069i72E6C9CABE6C7C5B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_11-1589550861205.png%22%20alt%3D%22Anisha1721_11-1589550861205.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3EDeletion%20of%20container%20could%20also%20delete%20the%20blobs.%20while%20I%20tried%20deleting%20the%20container%20the%20below%20error%20was%20observed%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_12-1589550861222.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192071i784DFFDD83332E5F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_12-1589550861222.png%22%20alt%3D%22Anisha1721_12-1589550861222.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%20start%3D%225%22%3E%0A%3CLI%3EDeletion%20of%20storage%20account%20can%20also%20delete%20the%20blobs.%20While%20I%20tried%20deletion%20of%20storage%20account%20the%20below%20is%20the%20error%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anisha1721_13-1589550861242.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192070i9B978F99503F9388%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Anisha1721_13-1589550861242.png%22%20alt%3D%22Anisha1721_13-1589550861242.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20helps%20!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1392971%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Storage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECustom%20RBAC%20role%20in%20Azure%20Storage%20to%20perform%20upload%20download%20operation%20%26amp%3B%20restrict%20delete%20operation%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Scenario:

This article explains step by step procedure to accomplish the below requirement in Azure Storage using custom RBAC role:

  1. Read and write operation for container and blobs should be allowed for the users
  2. Delete operations should be restricted

The above custom RBAC role should be assigned at the resource group level.

 

Pre-Requisites:

  1. Azure Storage GPV2 / ADLS Gen 2 Storage account
  2. Ensure that you have enough permissions to create custom roles, such as Owner or User Access Administrator

Action:

You could follow the below steps to create a custom RBAC role using the Azure portal.

The creation of custom RBAC role can be done using the below methods:

  1. Using PowerShell : please refer : https://docs.microsoft.com/en-us/azure/role-based-access-control/tutorial-custom-role-powershell
  2. Using AzCLI : please refer : https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles-cli
  3. Using Rest API : please refer : https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles-rest

Step 1:

  1. Sign-in to the Azure portal with your credentials
  2. Go to the resource group where you could like the role to be implemented/ scoped to.
  3. Select Access Control (IAM)->Add-> Add Custom Role:

Anisha1721_0-1589550860875.png

 

Step 2:

Give a suitable name and description for the role.

 

Anisha1721_1-1589550860920.png

 

Step 3:

The Baseline permission parameters helps with deciding whether you want to create your custom role by cloning and then modifying an existing role or by starting from scratch.

  • Here, I would be choosing the option of <Clone a Role >
  • Role to clone: I would be choosing is <Storage Blob Data Contributor> as it inclines more to the custom role that I would create. You could choose any other roles to clone as per your use case.

Anisha1721_2-1589550860948.png

 

Step 4:

Under the Permissions Tab, I would be altering the permissions as per my use case. I would be making changes to the below highlighted permissions as it aligns to my use case:

 

Anisha1721_3-1589550860999.png

 

To Add/ Exclude permissions

  1. Choose the option either add/ exclude and then you search for the resource you would like to assign the permission.
  2. As I would like to exclude the permission for deletion operation at the storage account, I have used the below:

Anisha1721_4-1589550861024.png

 

Excluding the required permissions:

  1. Under Not Actions : This is more inclined to management plane permissions. I have chosen the below 2 permissions:

Anisha1721_5-1589550861064.png

 

  1. For Not Data Actions: This is more inclined to Data Plane operations

Anisha1721_6-1589550861100.png

 

The final format of the Custom RBAC role is as below, with scope at resource group level. This has been created by clicking on the create option

 

Anisha1721_7-1589550861124.png

 

Step 5:

Once the role has been created the role, we can assign it to the user as below

  1. Azure portal -> Resource group
  2. Access control (IAM) -> add-> role assignment
  3. From the role assignment choose the custom role you have created and assign it to the user

Anisha1721_8-1589550861161.png

 

 

Please Note

Along with the above permission, I have given the user Reader permission at the subscription level. You could give the Reader permission at the resource group level too.

We mainly have Management Plane and Data Plane while providing permissions to the user.

Hence, it is important that you give minimum of ‘Reader’ role at the Management plane level

 

Step 6:

The storage account <teststorage2355> was deployed under the resource group <CustomRBAC> where the Custom RBAC role was assigned for the user

The below operations were checked by the user to see if the RBAC role was working appropriately:

 

  1. Upload blobs to blob storage successfully

Anisha1721_9-1589550861175.png

 

  1. Download blobs from blob storage successfully

Anisha1721_10-1589550861191.png

  1. Delete blobs from blob storage causing the below failures

Anisha1721_11-1589550861205.png

 

  1. Deletion of container could also delete the blobs. while I tried deleting the container the below error was observed

Anisha1721_12-1589550861222.png

  1. Deletion of storage account can also delete the blobs. While I tried deletion of storage account the below is the error:

Anisha1721_13-1589550861242.png

 

Hope this helps !