Introduction
Hello Everyone,
Hope you all are staying safe and healthy.
Today, I am going to share a very useful #PowerGuideTip14 related to PowerApps Portals Authentication, which will help you to design a process, where you require to automate your PowerApps Portals Authentication.
You might know, Portal Users has following ways to access PowerApps Portals:
Local Authentication: User hits the Portal URL in browser > Register and Can start accessing the Portals through their chosen Username and Password.
External Authentication: User hits the Portal URL in browser > Register through either Social Media Accounts, Azure AD, B2C, B2B account and can start accessing the Portals.
In both the type of authentications, any type of audience is allowed to Register and Start accessing the Portal. However, sometimes you want to restrict your Portal traffic and want to allow accessing the Portal to the Invited users only.
Here comes, the Portal Invitation Process.
Portal Invitation is the process where your organisation decides, who\’ll access the portal by sending the personal email invitation.
Now, this invitation could be sent to either New Users or your Existing Users (Contacts).
You can have a look at this article to know more about the PowerApps Portal Invitation process.
While sending the Portal Invitation there might be a business need where you might require to send Autogenerated Username and Temporary Password. So today in this article, I am going to share the solution of the same.
Requirement
1. Send Autogenerated Username and Password to the Portals Invited Users.
2. Redirect User to Password Reset Page immediately after the successful login.
Local Authentication
Solution
I have designed a Real-Time Workflow (that you can download from my Git Hub repo) to auto-generate the username and password for the portal users. You can update the workflow steps as per your business need.
Solution Component
Workflow Name: Portals – Auto Generate Username and Password
Trigger Point: On-demand (configure the trigger point as per your business need, like on creating of contact record or you can trigger it on the update of any field also)
Scope: Organisation
Type: Real-Time
This workflow has 4 steps
Step 1- Generate a Unique Temporary Password (OOB Custom Workflow of AdxStudio)
Step 2 – Update Contact record with relevant information, that is required to access the Portals. Like
- Turn On the Login Enabled and Lockout Enabled Field.
- Copy email address from the Email (emailaddress1) field to the Username field
Step 3 – Update the uniquely generated password (Step1) in the Contact record in the Hash format. (OOB Custom Workflow of AdxStudio)
Step 4 – Generate a Security Stamp, which is mandatory to be generated for the generated password and portal login (OOB Custom Workflow of AdxStudio)
Step 5 – Send an Email to User with Username and Password
Pre-requisites to use the solution
- You need to have PowerApps Portal installed (any portal type) in your Dynamics 365 Instance.
- Managed Solution (Download it from my Git Hub Repo).
Usage Steps
Dynamics 365:
- Import the Managed Solution downloaded from Git Hub
- Open any existing Contact record (must have unique emailaddress)
- Go To the Flow from the Ribbon Bar
- Choose Portals – Auto Generate Username and Password workflow from the list
- Provide the confirmation
- Open the Portal Contact form > Go to Web Authentication Tab.
- You\’ll see the portal authentication-related information has got updated on the form.
- Check the email or can directly open the email record from Timeline.
- You\’ll see the Username (email address) and a temporary password has got generated.
- Hit the Portal URL in the browser.
- Enter the username and password received in the email
- Once logged In successfully, you\’ll be redirected to Password Reset Page, where you can reset the password as per your wish.
I have provided a Power Automate solution that automatically creates a Guest User (Azure AD B2C) in your Azure AD tenant along with Username and Password and sends them the invitation as well.
Pre-Requisites
In order to use this Power Automate Solution, you need to consider following pre-requisites
- Appropriate License to use Power Automate
- Download my Power Automate solution from Git Hub Repository.
- Azure AD B2C setup in Azure and Portals both. Can check this article for more details.
- Trigger Point to trigger the Power Automate solution. I have kept my Power Automate trigger is Manual, however you can trigger it as per your business need)
Usage Steps
- Import the Power Automate Solution downloaded from Git Hub
- Update the Azure AD configurations like Clientid, Secret Key, Tenant ID etc
- Change the Power Automate Trigger as per your business need.
- Run the Power Automate
Demo
Git Hub Repository
Local Authentication – Autogenerate Username & Password
https://github.com/arpitdynamics/Dynamics365Code/blob/master/PortalLocalAutogenerateUsernamePassword_1_0_0_0_managed.zip
Azure AD B2C Authentication – Autogenerate Username & Password
Important Points
- This article is just a guidance to autogenerate username & password, I am using contact record Guid for unique temporary password generation> However, if you have a need to generate the temporary password more complex, or in a specific format (including Uppercase/Lowercase/Special Character) or as per your business need. You can use Power Automate as well.
- I have kept Real-Time Workflow and Power Automate Solution On-Demand. Hence, change the trigger point and run it as per your business need.
- Once you import the managed solution (downloaded from git hub) in your Dynamics 365 instance. Real-time Workflow may be available in Draft mode. You need to Activate it after making the configuration as per your organization need.
Hope you find this article useful and helpful to solve your business need.
Stay Tuned for my next #PowerGuideTip15
Cheers
Hi Arpit, I have followed your steps for Local authentication. I don't see the workflow which you have mentioned. But, i have imported your managed solution. Please help me.
LikeLike
Once you import the solution, you must seen a new workflow added in your existing workflow list.Note: It may be possible that workflow is available in draft mode. You may need to configure as per your instance/user configuration.Hope it helpsThanks
LikeLike
Yes. you are correct. my workflow was in draft status and did modification as per my requirement. Awesome work by you. great. thaks a lot.
LikeLike
Hi Arpit,Thank you so much for the work and effort you put into this blog, it has helped me endlessly! There's just one section I can't get working, redirecting the user to the Change Password screen when logging in using the generated credentials.I created the two option field for managing this process as suggested but I do not know where to provide the custom JavaScript or how to access the value of this field using JavaScript. I've tried placing some sample code in the Custom JavaScript option within the Profile Web Page entity record but this is not working.Would you please be able to provide the sample code for this functionality, or even highlight how I can access the name of the two option field I created.Thank you!
LikeLike
\”\”\”Dear Admin,I am Universal Investment Strategies. Very informative post! I am thankful to you for providing this unique information.Universal Investment Strategies provides one-on-one options trading mentorship and education to investors seeking to generate active, passive and/or retirement income. With over 25 years of combined experience and thousands of satisfied customers, Universal Investment Strategies was founded on the principals of we will walk with you side by side every step of the way.Universal Investment Strategies LOS ANGELES CAOnline Stock TradingBest Options To TradeLearn How To Trade StocksBest Trading CoursesBest Way To Learn Stock Trading\”\”\”
LikeLike
Hey there! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having trouble finding one? Thanks a lot!cash for cars brisbanecash for cars logancash for cars caboolture
LikeLike
The tutorial is very helpful for a first timer like me, by the way if you could have given a tutorial on creating a free website, it would have been very helpful for newbies like me.Thank youcash for cars adelaidecash For cars Nambourcar recycling Adelaide
LikeLike
Simply want to say your article is as surprising. The clearness in your post is simply great and i could assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please continue the enjoyable work.cash for cars gold coastCash for Cars Burleigh HeadsCash for Cars Elanora
LikeLike
Wow, that was strange. I just wrote a really long comment but after I clicked submit my comment didn't show up. Grrrr… well, I'm not writing all that over again. Anyways, just wanted to say fantastic blog!cash for cars brisbanecash for cars gold coastcash for cars sydneycash for cars Ipswich
LikeLike
This comment has been removed by the author.
LikeLike
This comment has been removed by the author.
LikeLike
It’s actually a great and also handy section of details. I am just fulfilled that you simply contributed this helpful info along with us.. Be sure to keep us knowledgeable similar to this. Thank you for expressing.sell my car brisbanecash for scrap cars brisbanecash for cars brisbane
LikeLike
Great remarkable issues here. I’m very glad to look your article. Thanks a lot and I am having a look forward to touch you. Will you please drop me a mail?cash for cars caboolturecash for cars brisbanecash for cars ipswich
LikeLike
Excellent post, its amazing that its necessary really but it is. I think Iarfhlaith's point about bigger buttons attracting more comments is very true. I'm subtle that way.cash for cars ipswichsell your car Ipswich
LikeLike
Cash for cars Adelaide is a convenient and rewarding option for you to sell your car. You can sell your used, scrap, unwanted or broken car almost immediately. There are many ways you can use this cash for cars Adelaide' options such as selling your car towing services, private traders, car auctions, online dealerships etc.Regard: cars for cash adelaide
LikeLike
Cash for Cars can be regarded as the most convenient and fast way to dispose off your old free car removal Brisbane today. They are experts in accepting all kinds of vehicles, be it cars, bikes or even farm vehicles. Regard: cash for scrap cars
LikeLike
Way cool! Some extremely valid points! I appreciate you penning this write-up plus the rest of the website is also really good.cash for cars gold coastcash for cars in gold coast
LikeLike
I used to be able to find good info from your blog posts.cash for cars ipswichipswich cash for cars
LikeLike
Wonderful post! We are linking to this great article on our site. Keep up the good writing.skip bin hire ipswichskip bins ipswich
LikeLike
This is a great tip especially to those new to the blogosphere. Short but very precise information… Thanks for sharing this one. A must read post!top cash for car brisbanetop cash for cars brisbane
LikeLike
I couldn’t resist commenting. Exceptionally well written!cash for cars QLDQLD cash for cars
LikeLike
Saved as a favorite, I really like your web site!broken car removalscrap car removal brisbane
LikeLike
You actually make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I’m looking forward to your next post, I will try to get the hang of it!cash for cars ipswichcash for scrap cars ipswich
LikeLike
Simply want to say your article is as surprising. The clearness in your post is simply great and i could assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please continue the enjoyable work.cash for cars ipswichscrap cars ipswich
LikeLike
Good post. I learn something new and challenging on websites I stumbleupon everyday. It's always helpful to read articles from other authors and practice something from other web sites.car for cash brisbanecash for cars brisbane
LikeLike
Wow, that was strange. I just wrote a really long comment but after I clicked submit my comment didn't show up. Grrrr… well, I'm not writing all that over again. Anyways, just wanted to say fantastic blog!cash for cars gold coastcash for scrap cars gold coast
LikeLike
Shop Online For The Latest Fashion Trends In Women's And Men's Clothing At Triton's Scepter Online Store. Latest Styles In Men's Clothing & Women's Clothing Featuring On-Trend Men's & Women's Fashion And ClothingWomen's Clothing
LikeLike
Excellent blog! Are you looking for Used car buyer, Old car buyer
LikeLike
Great information. Thanks for sharing this article. This blog is very informative. It really helps those who are struggling to provide services in cash for cars Brisbane. I have already followed your blog.cash for cars brisbane
LikeLike