{"id":189,"date":"2022-01-06T11:30:54","date_gmt":"2022-01-06T11:30:54","guid":{"rendered":"https:\/\/blog.citrus-lime.com\/crmc\/?p=189"},"modified":"2022-01-06T11:30:55","modified_gmt":"2022-01-06T11:30:55","slug":"part-2-power-apps-portals-new-application-registration-in-azure-b2c-for-our-power-apps-portal","status":"publish","type":"post","link":"https:\/\/blog.citrus-lime.com\/crmc\/part-2-power-apps-portals-new-application-registration-in-azure-b2c-for-our-power-apps-portal\/","title":{"rendered":"Part 2 &#8211; Power Apps Portals: New Application Registration in Azure B2C for our Power Apps Portal"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/svghandler\/active-directory-b2c?width=600&amp;height=315\" alt=\"See the source image\" width=\"369\" height=\"194\" \/><\/figure><\/div>\n\n\n\n<p>Now we have an Azure B2C Tenant created \u2013 we need to add a new Application Registration into the Directory, this will act as the go between component from the Portal into Azure B2C.<\/p>\n\n\n\n<p>We do this within the Azure Portal, making sure we have&nbsp;<strong>Switched Tenants<\/strong>&nbsp;into our Azure B2C Tenant and then navigate into App Registrations.<\/p>\n\n\n\n<p>This may be blank if we are using a new Azure B2C Tenant, but not to worry, we are going to add our first App into the Directory and specify the right details to link up with our Portal.<\/p>\n\n\n\n<p><strong>New Registration<\/strong>&nbsp;will open a screen where we can supply the&nbsp;<em>Name<\/em>&nbsp;and&nbsp;<em>Redirect URL<\/em>&nbsp;of our new App Registration.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_737ED721.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_0C0E7472.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<p><br>The Redirect URL will be the URL of our Portal, but with a forward slash and then the name we have configured for Azure B2C Authentication, if we are using default settings then this will be&nbsp;<strong>\/signin-b2c<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/mygreatbigportal.powerappsportals.com\/signin-b2c\n<\/div><\/figure>\n\n\n\n<p>This App Registration is the connecting glue between the Directory and the Portal.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Access Tokens for Implicit Flow<\/h4>\n\n\n\n<p>Power Apps Portals uses an Access Token for authentication to allow an implicit flow from the Portal Login into Azure B2C \u2013 and this needs to be configured in our App Registration \u2013 this is done in the&nbsp;<strong>Authentication<\/strong>&nbsp;area of the App Registration, and then by ticking the \u2018Access Tokens (used for implicit flows)&#8217;\u2019 setting.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_6A13BEC7.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_575EC510.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">&nbsp;&nbsp;&nbsp;&nbsp;<br><br><br>Application Client ID&nbsp;<\/h4>\n\n\n\n<p>Each Application we register will come with an auto-generated Client ID as the unique identifier for the App \u2013 we should note this down within Azure as we will need to configure this between the Site Settings of our Portal and Azure B2C:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Application (client) ID<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_73035106.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_4BC907D1.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<p><br><br>This corresponds to the following setting in the Site Settings of our Portal Apps Portal configuration:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_42EB5969.png\"><img decoding=\"async\" src=\"https:\/\/license.citruslime.com\/cs\/blogs\/crmcs\/image_thumb_1BB11034.png\" alt=\"image\" title=\"image\" \/><\/a><\/figure>\n\n\n\n<p><br><br>With this Site Setting configured between Portal Management and Azure B2C, this will inform how the Portal communicates to Azure B2C.<\/p>\n\n\n\n<p>Now with our Application Registration set, we then need to define the appearance and logic for how the flow of the User Authentication will work \u2013 we do this via User Flows in our Azure B2C Tenant<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p><strong>Next Article<\/strong>&nbsp;&gt;&gt;&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/www.crmcs.co.uk\/content\/azure-b2c-and-power-apps-portals-user-flow-for-signup-and-signin.aspx\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Part 3 \u2013 Power Apps Portals &#8211; User Flow for Signup and Signin<\/strong><\/a><\/p>\n\n\n\n<p><strong>Further Reading\u2026<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.crmcs.co.uk\/what-we-do\/powerapps-portals\/\">https:\/\/www.crmcs.co.uk\/what-we-do\/powerapps-portals\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now we have an Azure B2C Tenant created \u2013 we need to add a new Application Registration into the Directory, this will act as the go between component from the Portal into Azure B2C. We do this within the Azure Portal, making sure we have&nbsp;Switched Tenants&nbsp;into our Azure B2C Tenant and then navigate into App<\/p>\n","protected":false},"author":43,"featured_media":43,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[3],"tags":[],"class_list":{"0":"post-189","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-crm"},"featured_image_src":"https:\/\/blog.citrus-lime.com\/crmc\/wp-content\/uploads\/sites\/30\/2021\/11\/Untitled-design-41.png","author_info":{"display_name":"jadesmith","author_link":"https:\/\/blog.citrus-lime.com\/crmc\/author\/jadesmith\/"},"_links":{"self":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":1,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/posts\/189\/revisions\/190"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/media\/43"}],"wp:attachment":[{"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.citrus-lime.com\/crmc\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}