Após a criação das regras de synchronismo poderá ocorrer os seguintes erros caso você não tenha habilitado as devidas MPR´s.
“Identity Manager Policy prohibits the request from completing.”
“"failed-creation-via-web services"
"failed modification via web services"
Looking at the detailed error trace here's the output:
There is an error executing a web service object creation request.
Type: Microsoft.ResourceManagement.WebServices.Client.PermissionDeniedException
Message: Fault Reason: Policy prohibits the request from completing.
Fault Details: <RequestFailures xmlns="http://schemas.microsoft.com/2006/11/ResourceManagement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"></RequestFailures>
Stack Trace: at Microsoft.ResourceManagement.WebServices.ResourceFactoryClient.Create(Message request)
at Microsoft.ResourceManagement.WebServices.ResourceFactoryClient.Create(Create createBody)
at Microsoft.ResourceManagement.WebServices.Client.ResourceTemplate.CreateResource()
Inner Exception: Policy prohibits the request from completing.
Como verificar quais MPR´s devem ser habilitadas?
Executar o script PowerShell abaixo
Using PowerShell to check your MPR configuration for synchronization
- #-------------------------------------------------------------------------------------------------------------------------
- # Name : Using PowerShell to check your MPR configuration for synchronization
- # Version: 2.0
- #-------------------------------------------------------------------------------------------------------------------------
- Set-Variable -Name URI -Value "http://localhost:5725/resourcemanagementservice' " -Option Constant
- Set-Variable -Name msgWarning -Value "Caution: Your current MPR configuration requires your attention!" -Option Constant
- Set-Variable -name msgOK -Value "Your current MPR configuration meets all requirements" -Option Constant
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetObjects
- {
- Param($Filter)
- End
- {
- $ExportObject = Export-Fimconfig -uri $URI `
- –onlyBaseResources `
- -customconfig ($Filter) `
- -ErrorVariable Err `
- -ErrorAction SilentlyContinue
- If($Err){Throw $Err}
- Return $ExportObject
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function ShowResults
- {
- Param([ref]$bActionItem, $lstAttributes, $msgMissing)
- End
- {
- if([int]($lstAttributes.length) -eq 0) {return}
- $bActionItem.value = $true
- Write-Host "`n$msgMissing" -foregroundcolor black -backgroundcolor yellow
- ForEach($attributeName In $lstAttributes) {Write-Host " -$attributeName"}
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetXmlDoc
- {
- Param($exportObjects, $attributeName)
- End
- {
- $curAttribute = $exportObjects.ResourceManagementObject.ResourceManagementAttributes | `
- Where-Object {$_.AttributeName -eq "$attributeName"}
- Return "<root>$($curAttribute.Value)</root>"
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetDataFromMpr
- {
- Param($mprName, [ref]$lstMissingMpr, [ref]$lstDisabledMpr)
- End
- {
- $curMprObject = GetObjects -Filter "/ManagementPolicyRule[DisplayName='$mprName']"
- If($curMprObject -eq $null) {$lstMissingMpr.value += $mprName}
- Else
- {
- $curAttribute = $curMprObject.ResourceManagementObject.ResourceManagementAttributes | `
- Where-Object {$_.AttributeName -eq "Disabled"}
- If($curAttribute.Value -eq "True") {$lstDisabledMpr.value += $mprName}
- }
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetResAttrsForMpr
- {
- Param($mprName)
- End
- {
- $curMprObject = GetObjects -Filter "/ManagementPolicyRule[DisplayName='$mprName']"
- If($curMprObject -eq $null) {Return @()}
- $curAttribute = $curMprObject.ResourceManagementObject.ResourceManagementAttributes | `
- Where-Object {$_.AttributeName -eq "ActionParameter"}
- If($curAttribute -eq $null) {Return @()}
- return $curAttribute.Values
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetEafAttributesForObjectType
- {
- Param($cdObjectType, $mvObjectType, $xmlDoc)
- End
- {
- $lstAttribute = @()
- $typeNode = $xmlDoc.selectSingleNode("//export-flow-set[@cd-object-type='$cdObjectType' and @mv-object-type='$mvObjectType']")
- If($typeNode -eq $null) {Return $lstAttribute}
- ForEach($curNode in $typeNode.selectNodes("export-flow[direct-mapping]"))
- {
- $lstAttribute += $curNode.selectSingleNode("@cd-attribute").get_InnerText()
- }
-
- Return $lstAttribute
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Function GetAttributeDiff
- {
- Param([array]$lstSource, [array]$lstTarget)
- End
- {
- $lstAttributes = @()
- ForEach($attrName in $lstSource)
- {
- If(!($lstTarget -contains $attrName)) {$lstAttributes += $attrName}
- }
-
- Return $lstAttributes
- }
- }
- #-------------------------------------------------------------------------------------------------------------------------
- If(@(Get-PSSnapin | Where-Object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {Add-PSSnapin FIMAutomation}
- #-------------------------------------------------------------------------------------------------------------------------
- $exportObjects = GetObjects -Filter "/ma-data[SyncConfig-category='FIM']"
- If($exportObjects -eq $null) {Throw "There is no FIM MA configured on your system!"}
- [xml]$xmlExportFlow = GetXmlDoc -exportObjects $exportObjects `
- -attributeName "SyncConfig-export-attribute-flow"
- [xml]$xmlProjection = GetXmlDoc -exportObjects $exportObjects `
- -attributeName "SyncConfig-projection"
-
- [array]$lstEafAttributesPerson = GetEafAttributesForObjectType -cdObjectType "Person" `
- -mvObjectType "person" `
- -xmlDoc $xmlExportFlow
-
- [array]$lstEafAttributesGroup = GetEafAttributesForObjectType -cdObjectType "Group" `
- -mvObjectType "group" `
- -xmlDoc $xmlExportFlow
-
- If($lstEafAttributesGroup -contains "Member")
- {
- $lstEafAttributesGroup = @($lstEafAttributesGroup | Where-Object {$_ -ne 'Member'})
- $lstEafAttributesGroup += "ExplicitMember" }
- If($xmlProjection.selectNodes("//class-mapping[@cd-object-type='Person']").get_count() -eq 0) {Throw "The FIM management agent does not manage person objects"}
-
- $bHasGroups = $xmlProjection.selectNodes("//class-mapping[@cd-object-type='Group']").get_count() -gt 0
- #-------------------------------------------------------------------------------------------------------------------------
- $mprNames = @()
- $mprNames += "General: Users can read schema related resources"
- $mprNames += "General: Users can read non-administrative configuration resources"
- $mprNames += "User management: Users can read attributes of their own"
- $mprNames += "Synchronization: Synchronization account can delete and update expected rule entry resources"
- $mprNames += "Synchronization: Synchronization account can read schema related resources"
- $mprNames += "Synchronization: Synchronization account can read synchronization related resources"
- $mprNames += "Synchronization: Synchronization account can read users it synchronizes"
- $mprNames += "Synchronization: Synchronization account controls detected rule entry resources"
- $mprNames += "Synchronization: Synchronization account controls synchronization configuration resources"
- $mprNames += "Synchronization: Synchronization account controls users it synchronizes"
-
- If($bHasGroups -eq $true)
- {
- $mprNames += "Synchronization: Synchronization account can read group resources it synchronizes"
- $mprNames += "Synchronization: Synchronization account controls group resources it synchronizes"
- }
- #-------------------------------------------------------------------------------------------------------------------------
- $bActionItem = $false
- $lstDisabledMpr = @()
- $lstMissingMpr = @()
-
- ForEach($mprName In $mprNames)
- {
- GetDataFromMpr -mprName $mprName `
- -lstMissingMpr ([ref]$lstMissingMpr) `
- -lstDisabledMpr ([ref]$lstDisabledMpr)
- }
- #-------------------------------------------------------------------------------------------------------------------------
- Clear-Host
- Write-Host "`nFIM MPR Configuration For Synchronization Check"
- Write-Host "==============================================="
- ShowResults -bActionItem ([ref]$bActionItem) `
- -lstAttributes $lstMissingMpr `
- -msgMissing "Missing MPRs:"
-
- ShowResults -bActionItem ([ref]$bActionItem) `
- -lstAttributes $lstDisabledMpr `
- -msgMissing "MPRs that need to be enabled:"
-
- $mprName = "Synchronization: Synchronization account controls users it synchronizes"
-
- [array]$lstResAttributes = GetResAttrsForMpr -mprName $mprName
- [array]$lstMissingAttrs = GetAttributeDiff -lstSource $lstEafAttributesPerson `
- -lstTarget $lstResAttributes
- ShowResults -bActionItem ([ref]$bActionItem) `
- -lstAttributes $lstMissingAttrs `
- -msgMissing "Missing attributes of $($mprName):"
-
- If($bHasGroups -eq $true)
- {
- $mprName = "Synchronization: Synchronization account controls group resources it synchronizes"
- $lstResAttributes = GetResAttrsForMpr -mprName $mprName
- $lstMissingAttrs = GetAttributeDiff -lstSource $lstEafAttributesGroup `
- -lstTarget $lstResAttributes
- ShowResults -bActionItem ([ref]$bActionItem) `
- -lstAttributes $lstMissingAttrs `
- -msgMissing "Missing attributes of $($mprName):"
- }
- #-------------------------------------------------------------------------------------------------------------------------
- If($bActionItem -eq $true) {write-host "`n$msgWarning`n" -foregroundcolor white -backgroundcolor darkblue}
- Else {write-host "`n$msgOK"}
- #-------------------------------------------------------------------------------------------------------------------------
- Trap
- {
- Write-Host "`nError: $($_.Exception.Message)`n" -foregroundcolor white -backgroundcolor darkred
- Write-Host $_.Exception.GetType().FullName -foregroundcolor white -backgroundcolor darkred
- Exit 1
- }
- #-------------------------------------------------------------------------------------------------------------------------
Source Script:
Using PowerShell to check your MPR configuration for synchronization
Executar o script que ira trazer quais as MPR´s deverão ser habilitadas conforme mostra abaixo.
“MPRs that need to be anabled”
Basta habilitar as MPRs que os sincronismos irá ocorrer sem problemas.
Caramba cara como é difícil encontrar bons artigos assim sobre FIM, com script e tudo, verei fã mesmo do seu blog, nota 10, parabéns. Gostaria de aprender mais sobre FIM, quando teremos aqui no blog usn posts de introdução? :)
ResponderExcluirOla meu amigo, Muito bom ouvir isso.
ResponderExcluirEstou preparando um material voltado para introdução e uma boa explanação das funcionalidades do FIM, Já temos algumas coisas que serão muito ulteis você, Segue abaixo.
http://lucasmarquesit.blogspot.com/search/label/SQL%20Server%202008
http://lucasmarquesit.blogspot.com/search/label/WSS%203.0
http://lucasmarquesit.blogspot.com/2010/06/instalando-forefront-identity-manager.html
Inicialmente de uma olhada no link abaixo que tem um material muito bom para iniciar o entendimento no FIM 2010.
http://technet.microsoft.com/en-us/library/ee621261(WS.10).aspx
Muito obrigado, Até breve.