{"id":38441,"date":"2020-02-12T07:50:05","date_gmt":"2020-02-12T14:50:05","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/premier-developer\/?p=38441"},"modified":"2020-02-10T08:13:19","modified_gmt":"2020-02-10T15:13:19","slug":"powershell-to-upload-ief-policies-to-multiple-b2c-tenants","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/powershell-to-upload-ief-policies-to-multiple-b2c-tenants\/","title":{"rendered":"PowerShell to upload IEF policies to multiple B2C tenants"},"content":{"rendered":"<p>Premier Dev Consultant <a href=\"https:\/\/www.linkedin.com\/in\/marius-rochon-30200687\" target=\"_blank\" rel=\"noopener noreferrer\">Marius Rochon<\/a> shares an example of a PowerShell script to upload a set of B2C IEF policies to one or more B2C tenants.<\/p>\n<hr \/>\n<p>For your convenience, these scripts and walkthrough are provided on <a href=\"https:\/\/github.com\/mrochon\/b2cief-upload\">GitHub<\/a> to accomplish the following:<\/p>\n<ol>\n<li>Modify a set of IEF policies using values from a configuration file<\/li>\n<li>Uploads the files to one or more B2C tenants<\/li>\n<\/ol>\n<p>(For better security, particularly if using the script for updating multiple B2C tenants, use X509 as credential. You will need to modify the script of course)<\/p>\n<p>Where:<\/p>\n<ul>\n<li>clientId is the Application Id from application registration step<\/li>\n<li>clientSecret is the Application Key from application registration step<\/li>\n<li>confFile is the location of your appSettings.json file<\/li>\n<li>source is the directory containing your IEF policies<\/li>\n<li>dest (optional) is the directory where the script should save copies of modified and uploaded policies<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Premier Dev Consultant Marius Rochon shares an example of a PowerShell script to upload a set of B2C IEF policies to one or more B2C tenants.<\/p>\n","protected":false},"author":582,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[24,1131,266,3],"class_list":["post-38441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure","tag-b2c","tag-marius-rochon","tag-team"],"acf":[],"blog_post_summary":"<p>Premier Dev Consultant Marius Rochon shares an example of a PowerShell script to upload a set of B2C IEF policies to one or more B2C tenants.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=38441"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38441\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=38441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=38441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=38441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}