{"id":275,"date":"2021-04-10T18:39:43","date_gmt":"2021-04-10T18:39:43","guid":{"rendered":"https:\/\/thecloudwiki.com\/?p=275"},"modified":"2021-06-20T15:44:58","modified_gmt":"2021-06-20T15:44:58","slug":"service-principal-creation","status":"publish","type":"post","link":"https:\/\/thecloudwiki.com\/?p=275","title":{"rendered":"Azure Basics &#8211; Service Principal creation"},"content":{"rendered":"<p><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Service principal in Azure is used for accessing the Azure resources by third-party applications, automation tools, and applications.<br \/>\nAn Azure admin can control the access level for these Service principals and it&#8217;s always a better approach to provide only required privileges than an application required to access the resources.<br \/>\nService Principal is a kind of service account that we generally use in the Active directory to bind with certain services rather than providing individuals id&#8217;s.<\/span><\/p>\n<h3><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\"><strong><span style=\"font-size: 20px;\">Create Service principal from Azure Portal:<\/span><br \/>\n<\/strong><\/span><\/h3>\n<ul style=\"list-style-type: square;\">\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Login to Azure portal<\/span><\/li>\n<li><span style=\"font-size: 16px;\"><span style=\"font-family: 'trebuchet ms', geneva;\">On the search bar type &#8220;<strong>app registrations<\/strong>&#8221; and <\/span><span style=\"font-family: 'trebuchet ms', geneva;\">select &#8220;<strong><span style=\"font-family: 'trebuchet ms', geneva;\">App registrations<\/span><\/strong>&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-276\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/AppRegistrations-01-e1618080121255.png\" alt=\"\" width=\"1692\" height=\"156\" \/><br \/>\n<\/span><\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Click on the &#8220;New registration&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-279\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02.png\" alt=\"\" width=\"1824\" height=\"156\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02.png 1824w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02-300x26.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02-1024x88.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02-768x66.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02-1536x131.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-02-1568x134.png 1568w\" sizes=\"auto, (max-width: 1824px) 100vw, 1824px\" \/><br \/>\n<\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Provide a name to the application and click on &#8220;Register&#8221;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-280\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-1024x516.png\" alt=\"\" width=\"750\" height=\"378\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-1024x516.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-300x151.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-768x387.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-1536x774.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03-1568x790.png 1568w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/App-registrations-03.png 1920w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/span><\/li>\n<li><span style=\"font-size: 16px;\"><span style=\"font-family: 'trebuchet ms', geneva;\">once app registration created, select the created &#8220;<strong>app registration<\/strong>&#8221; from &#8220;<strong>owned applications<\/strong>&#8220;<\/span><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-282\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1.png\" alt=\"\" width=\"3124\" height=\"1108\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1.png 3124w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-300x106.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-1024x363.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-768x272.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-1536x545.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-2048x726.png 2048w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04_1-1568x556.png 1568w\" sizes=\"auto, (max-width: 3124px) 100vw, 3124px\" \/><\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">The overview section provides the information on this app registration, and we need these details while using the service principal to connect to the resource, so please have a note of &#8211; Display Name, Application ID, Directory ID &amp; Object ID<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-283\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07.png\" alt=\"\" width=\"3100\" height=\"740\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07.png 3100w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-300x72.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-1024x244.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-768x183.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-1536x367.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-2048x489.png 2048w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-07-1568x374.png 1568w\" sizes=\"auto, (max-width: 3100px) 100vw, 3100px\" \/><\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Click on &#8220;<strong>Certificates &amp; secrets<\/strong>&#8221; to create a new client secret (By using this secret and the above info we can connect to Azure resources)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-286\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04.png\" alt=\"\" width=\"2852\" height=\"1138\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04.png 2852w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-300x120.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-1024x409.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-768x306.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-1536x613.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-2048x817.png 2048w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-04-1568x626.png 1568w\" sizes=\"auto, (max-width: 2852px) 100vw, 2852px\" \/><br \/>\n<\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">Provide a name to the &#8220;<strong>Secret<\/strong>&#8221; and Expiry of the secret then Click on Add<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-285\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-05_1.png\" alt=\"\" width=\"1162\" height=\"668\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-05_1.png 1162w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-05_1-300x172.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-05_1-1024x589.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-05_1-768x442.png 768w\" sizes=\"auto, (max-width: 1162px) 100vw, 1162px\" \/><br \/>\n<\/span><\/li>\n<li><span style=\"font-family: 'trebuchet ms', geneva; font-size: 16px;\">The secret is now created. once after the creation, you will be shown with Value for this secret and please copy it into a secured location since it can&#8217;t be viewed later<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-284\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06.png\" alt=\"\" width=\"819\" height=\"23\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06.png 2064w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-300x8.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-1024x28.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-768x21.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-1536x42.png 1536w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-2048x56.png 2048w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/app-registrations-06-1568x43.png 1568w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><br \/>\n<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Service principal in Azure is used for accessing the Azure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1357,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[14],"class_list":["post-275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure"],"uagb_featured_image_src":{"full":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-e1624203603466.png",400,203,false],"thumbnail":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-150x150.png",150,150,true],"medium":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-300x152.png",300,152,true],"medium_large":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-e1624203603466.png",400,203,false],"large":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-e1624203603466.png",400,203,false],"1536x1536":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-e1624203603466.png",400,203,false],"2048x2048":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-ServicePrincipal-feature-image-e1624203603466.png",400,203,false]},"uagb_author_info":{"display_name":"Sandeep","author_link":"https:\/\/thecloudwiki.com\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"Service principal in Azure is used for accessing the Azure [&hellip;]","_links":{"self":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":6,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":1364,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions\/1364"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/media\/1357"}],"wp:attachment":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}