Home
%3CLINGO-SUB%20id%3D%22lingo-sub-974798%22%20slang%3D%22en-US%22%3EMIM%20PAM%20Feature%20Installer%20Failure%20-%20SetADForestFunctionalLevel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-974798%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Jun%2021%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20I%20want%20to%20review%20a%20huge%20blocker%20that%20held%20up%20one%20of%20my%20recent%20installations%20of%20MIM%20PAM%20using%20the%20MIM%20Service%20and%20Portal%20installer.%20There%20are%20times%20where%20you%20may%20be%20under%20the%20impression%20that%20your%20MIM%20Portal%20pre-installation%20configuration%20work%20is%20sufficient%20to%20allow%20the%20installer%20to%20complete%20without%20rolling%20back%20everything%20it%20had%20tried%20to%20do.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20SPNs%20are%20set%20%3C%2FSPAN%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Service%20accounts%20are%20created%20with%20the%20correct%20delegations%20%3C%2FSPAN%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20The%20MIM%20install%20account%20has%20the%20correct%20permissions%20on%20the%20local%20server%20and%20target%20database%20including%20the%20ability%20to%20create%20Authentication%20policies%20and%20silos%20(more%20info%20%3C%2FSPAN%3E%20%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fiamsupport%2F2016%2F10%2F12%2Fsupport-tip-mim-sp1-pam-install-failure-createauthenticationpolicyandsilo-error-the-user-has-insufficient-access-rights%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20here%20%3C%2FSPAN%3E%20%3C%2FA%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20)%20%3C%2FSPAN%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20The%20MIM%20service%20account%20has%20the%20appropriate%20permissions%20to%20control%20msDS-ShadowPrincipal%20objects.%20%3C%2FSPAN%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Additional%20information%20on%20the%20point%20above%20can%20be%20found%20in%20the%20PAM%20Installation%20Microsoft%20Docs%3A%20%3C%2FSPAN%3E%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-identity-manager%2Fpam%2Fdeploy-pam-with-windows-server-2016%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20here%20%3C%2FSPAN%3E%20%3C%2FA%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20However%2C%20the%20installer%20aborts%20the%20installation%20procedure%20and%20rolls%20back%20all%20the%20changes%20that%20were%20made.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId-1851576739%22%20id%3D%22toc-hId-1851722039%22%3EEnable%20Verbose%20Logging%20for%20Installer%3C%2FH2%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Without%20verbose%20logging%20enabled%2C%20I%20was%20not%20going%20to%20get%20anywhere%20with%20troubleshooting.%20Make%20sure%20to%20run%20the%20installer%20with%20the%20following%20parameters%20and%20specify%20your%20desired%20file%20location.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CB%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20msiexec%20%2FI%20%22Service%20and%20Portal.msi%22%20%2FL*v%20C%3A%5CMIM-Install-Artifacts%5Clog.txt%20%3C%2FSPAN%3E%20%3C%2FB%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Searching%20for%20%3CI%3E%20Return%20Value%203%20%3C%2FI%3E%20places%20you%20in%20the%20most%20likely%20sections%20of%20the%20log%20that%20contain%20the%20error.%20The%20log%20had%20failure%20messages%20such%20for%20the%20step%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20%3CI%3E%20Doing%20action%3A%20UpdateADForestFunctionalLevel%20%3C%2FI%3E%20%3CB%3E%20%3C%2FB%3E%20%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Snippet%20of%20detailed%20error%3A%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CEM%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3ECalling%20custom%20action%20Microsoft.IdentityManagement.PAMRelatedCustomActions!%20%3CEM%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Microsoft.IdentityManagement.ManagedCustomActions.PAMRelatedCustomActions.Set%20%3CBR%20%2F%3E%20ADForestFunctionalLevel%20%3C%2FSPAN%3E%20%3C%2FEM%3E%20%3C%2FSPAN%3E%20%3C%2FEM%3E%20%3CBR%20%2F%3E%20%3CEM%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Access%20is%20Denied%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22PAMConfig-LogError-portalinstall%22%20border%3D%220%22%20height%3D%22149%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154012iEB0B029B4A8250BC%22%20title%3D%22PAMConfig-LogError-portalinstall%22%20width%3D%22761%22%20%2F%3E%20%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId--700580222%22%20id%3D%22toc-hId--700434922%22%3ETroubleshooting%3C%2FH2%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20My%20first%20thoughts%20were%20that%20my%20installer%20account%20didn't%20have%20the%20permissions%20to%20update%20the%20forest%20functional%20level.%20I%20did%20not%20give%20the%20installer%20account%20domain%20admin%20nor%20enterprise%20admin.%20But%20why%20would%20the%20installer%20be%20trying%20to%20do%20this%20in%20the%20first%20place%3F%20I%20was%20sure%20the%20forest%20functional%20level%20was%20correct.%20I%20verified%20that%20I%20had%20the%20correct%20forest%20functional%20level%20in%20my%20environment%20by%20running%20the%20command%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CI%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20(Get-ADForest).forestmode%20%3C%2FSPAN%3E%20%3C%2FI%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20PowerShell%20returned%20the%20expected%20ForestModeLevel%20%3CB%3E%207%20%3C%2FB%3E%20and%20ForestMode%20of%20%3CB%3E%20Windows2016Forest%20%3C%2FB%3E%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22128%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154013i793FB65823C15CB7%22%20title%3D%22image%22%20width%3D%22477%22%20%2F%3E%20%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId-1042230113%22%20id%3D%22toc-hId-1042375413%22%3ESolution%3C%2FH2%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20It%20turns%20out%20the%20MIM%20PAM%20install%20procedure%20attempts%20to%20create%20an%20OU%20in%20the%20root%20of%20your%20bastion%20forest%20called%20%3CB%3E%20PAM%20Objects%20%3C%2FB%3E%20.%20I%20could%20bump%20up%20the%20privileges%20of%20the%20MIM%20install%20account%20as%20a%20quick%20workaround%20though%2C%20in%20many%20situations%2C%20that%20is%20not%20desirable%20or%20even%20allowed.%20So%2C%20to%20continue%20without%20granting%20the%20account%20unnecessary%20privileges%2C%20I%20manually%20added%20the%20%3CB%3E%20PAM%20Objects%20%3C%2FB%3E%20OU%20into%20the%20root%20of%20my%20bastion%20forest.%20I%20re-ran%20the%20installer%20and%2C%20lo%20and%20behold%2C%20it%20completed%20successfully!%20This%20solution%20was%20carried%20out%20in%20a%20%3CEM%3E%20%3CU%3E%20lab%20%3C%2FU%3E%20%3C%2FEM%3E%20environment%2C%20proceed%20at%20your%20own%20risk.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22image%22%20border%3D%220%22%20height%3D%22361%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154014i7C65964F39EB971F%22%20title%3D%22image%22%20width%3D%22306%22%20%2F%3E%20%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId--1509926848%22%20id%3D%22toc-hId--1509781548%22%3EAdditional%20Comments%3C%2FH2%3E%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20It%20is%20important%20to%20note%2C%20since%20I%20created%20the%20PAM%20Objects%20OU%20outside%20of%20the%20installation%20process%2C%20that%20the%20mimservice%20account%20that%20handles%20creating%20PAM%20users%20(i.e.%20New-PAMUser)%20needs%20to%20have%20create%2C%20delete%2C%20and%20modify%20permissions%20on%20user%20objects%20for%20this%20new%20OU.%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20Be%20careful%20with%20the%20service%20or%20administrative%20accounts%20you%20create%20in%20your%20bastion%20forest.%20If%20you%20manually%20create%20a%20user%20in%20the%20bastion%20forest%20and%20try%20to%20have%20the%20New-PAMUser%20cmdlet%20create%20a%20PAM%20user%20that%20ends%20up%20taking%20the%20same%20account%20name%2C%20you%20will%20get%20an%20error%20such%20as%20%3CI%3E%20%3C%2FI%3E%20%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20%3CI%3ESystem.InvalidOperationException%3A%20A%20constraint%20violation%20occurred%20%3C%2FI%3E%20.%20%3C%2FSPAN%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20%3CIMG%20alt%3D%22New-PAMUser%20Error_verbose%22%20border%3D%220%22%20height%3D%22164%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154015i09F47C64D3758B9A%22%20title%3D%22New-PAMUser%20Error_verbose%22%20width%3D%22704%22%20%2F%3E%20%3CSPAN%20style%3D%22font-size%3A%20small%22%3E%20%3C%2FSPAN%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-974798%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Jun%2021%2C%202018%20I%20want%20to%20review%20a%20huge%20blocker%20that%20held%20up%20one%20of%20my%20recent%20installations%20of%20MIM%20PAM%20using%20the%20MIM%20Service%20and%20Portal%20installer.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-974798%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMIM%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emim%20portal%20install%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epam%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esetadforestfunctionallevel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Jun 21, 2018
I want to review a huge blocker that held up one of my recent installations of MIM PAM using the MIM Service and Portal installer. There are times where you may be under the impression that your MIM Portal pre-installation configuration work is sufficient to allow the installer to complete without rolling back everything it had tried to do.

  1. SPNs are set

  2. Service accounts are created with the correct delegations

  3. The MIM install account has the correct permissions on the local server and target database including the ability to create Authentication policies and silos (more info here )

  4. The MIM service account has the appropriate permissions to control msDS-ShadowPrincipal objects.


Additional information on the point above can be found in the PAM Installation Microsoft Docs: here .
However, the installer aborts the installation procedure and rolls back all the changes that were made.

Enable Verbose Logging for Installer


Without verbose logging enabled, I was not going to get anywhere with troubleshooting. Make sure to run the installer with the following parameters and specify your desired file location.
msiexec /I "Service and Portal.msi" /L*v C:\MIM-Install-Artifacts\log.txt

Searching for Return Value 3 places you in the most likely sections of the log that contain the error. The log had failure messages such for the step
Doing action: UpdateADForestFunctionalLevel

Snippet of detailed error:
Calling custom action Microsoft.IdentityManagement.PAMRelatedCustomActions! Microsoft.IdentityManagement.ManagedCustomActions.PAMRelatedCustomActions.Set
ADForestFunctionalLevel

Access is Denied

PAMConfig-LogError-portalinstall

Troubleshooting


My first thoughts were that my installer account didn't have the permissions to update the forest functional level. I did not give the installer account domain admin nor enterprise admin. But why would the installer be trying to do this in the first place? I was sure the forest functional level was correct. I verified that I had the correct forest functional level in my environment by running the command
(Get-ADForest).forestmode

PowerShell returned the expected ForestModeLevel 7 and ForestMode of Windows2016Forest
image

Solution


It turns out the MIM PAM install procedure attempts to create an OU in the root of your bastion forest called PAM Objects . I could bump up the privileges of the MIM install account as a quick workaround though, in many situations, that is not desirable or even allowed. So, to continue without granting the account unnecessary privileges, I manually added the PAM Objects OU into the root of my bastion forest. I re-ran the installer and, lo and behold, it completed successfully! This solution was carried out in a lab environment, proceed at your own risk.
image

Additional Comments


It is important to note, since I created the PAM Objects OU outside of the installation process, that the mimservice account that handles creating PAM users (i.e. New-PAMUser) needs to have create, delete, and modify permissions on user objects for this new OU.
Be careful with the service or administrative accounts you create in your bastion forest. If you manually create a user in the bastion forest and try to have the New-PAMUser cmdlet create a PAM user that ends up taking the same account name, you will get an error such as
System.InvalidOperationException: A constraint violation occurred .

New-PAMUser Error_verbose