Script to join the domain, the role of configuration, add permissions and activate/SNMP configuration

So I'm writing a script to install our vSphere hosts to work with our monitoring software.  Right now, it's all done by hand and I would like if possible to automate it.  So far, I came up with this.  I get to step 5 and that's where it fails.  I can get it manually run the Get-VIAccount command, but in the script, it fails.

These are my steps

1. connect to an existing host and retrieve role properties.

2. connect to the new host

3 join the domain.

4. disconnect the new host and reconnect with the credentials of domain

5. get the domain account, role of research/create and add permissions to host

6. enable and configure SNMP

7 restart MGMT officers.

#Variables

$vmhost = "Host03".

$domaintojoin = "Domaine.org".

$domainAlias = "domain".

# $usernametograntpermissions = "service.account".

$rolename = 'team - account control service '.

#Connect to host17 to retrieve the role privileges

to connect-viserver host17

#Extract of privileges for the role of vcenter Monitoring Service

$privsforrole = get-viprivilege-role (get-ferrule-name $rolename)

Server VI #disconnect

disconnect-viserver *-confirm: $false

VSphere hosts #Connect above (enter the credentials of the root when prompted)

SE connect-viserver-Server host03

#Join field

Get-vmhostauthentication - VMhost ctcvsphere3 | Game-VMHostAuthentication-domain $domaintojoin - user %-% - JoinDomain-confirm password password: $false

credentials of the #disconnect root

disconnect-viserver *-confirm: $false

#reconnect with the credentials of domain

SE connect-viserver-Server ctcvsphere3-user username-password password % domain\username

#Get domain account and add to the host

$viAccount = get-VIAccount-DOMAIN-User - ID service.account

# Get the role

$viRole = get-ferrule-name $roleName

If (-not $viRole) {}

throw the "Role of the creation.

New-ferrule-name $rolename - Server $vmhost

Together-ferrule-role (Get-ferrule-name $rolename - Server $vmhost) - AddPrivilege (get-VIPrivilege-id $privsforrole - Server $vmhost)

}

# Add permissions on VMHost

New-VIPermission-Director $viAccount-role $viRole - entity $vmHost

all VIServers #disconnect

Disconnect-VIServer *-confirm: $false

}

#Configure SNMP

Get-vmhostsnmp | set-vmhostsnmp-enabled: $true

Get-vmhostsnmp | game-vmhostsnmp - ReadOnlyCommunity 'SNMP.

#Restart Mgmt officers

Get-VMHostService - VMHost $vmhost | where {$_.} Key - eq "vpxa"} | Restart-VMHostService - Confirm: $falese - ErrorAction SilentlyContinue

Here is my error:

Get-VIAccount: 27/02/2014-16:03:11 VIAccount Get A general system

rror occurred: access to the directory error

C:\ps1\vmware\snmp1.ps1:42 char: 28

+ $viAccount = get-VIAccount < < < < - domain - User - ID SERVICE. ACCOUNT

+ CategoryInfo: NotSpecified: (:)) [Get-VIAccount], SystemError)

+ FullyQualifiedErrorId: Client20_VmHostServiceImpl_RetrieveUserGroups_Vi

Error, VMware.VimAutomation.ViCore.cmdlets.Commands.PermissionManagement.GE

tVIAccount

Get-VIAccount: 27/02/2014-16:03:11 Get - VIAccount VIAccount with the id

"service.account" was not found using the specified filters.

C:\ps1\vmware\snmp1.ps1:42 char: 28

+ $viAccount = get-VIAccount < < < < - domain - User - ID SERVICE. ACCOUNT

+ CategoryInfo: ObjectNotFound: (:)) [Get-VIAccount], VimExceptio)

n

+ FullyQualifiedErrorId: Core_OutputHelper_WriteNotFoundError, VMware.VimA

utomation.ViCore.Cmdlets.Commands.PermissionManagement.GetVIAccount

New-VIPermission: Impossible to validate the argument on the parameter "principal." The argument

ent is null or empty. Provide an argument that is not null or empty, and then try

the command again.

C:\ps1\vmware\snmp1.ps1:56 tank: 40

+ New-VIPermission-main < < < < $viAccount - $viRole - entity role

y $vmHost

+ CategoryInfo: InvalidData: (:)) [new VIPermission], ParameterBi)

ndingValidationException

+ FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutom

ation.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission

The term 'catch' is not recognized as a cmdlet, function, script fi

the, or an executable program. Check the spelling of the name, or if a path has been included

DED, make sure the path is correct, and then try again.

C:\ps1\vmware\snmp1.ps1:57 tank: 12

+ captures < < < < {}

+ CategoryInfo: ObjectNotFound: (catch: String) [], CommandNotFou

ndException

+ FullyQualifiedErrorId: CommandNotFoundException

Thanks in advance!

Dimitar did a nice write-up of this phenomenon and a possible solution.

See ESXi hosts to join a domain and licensing with PowerCLI

Tags: VMware

Similar Questions

  • First, I'm joining the forum with a question CS4 and CS5 Suite for Mac. Can someone tell me why it is NOT a place to submit a question as it is here?

    First, I'm joining the forum with a question CS4 and CS5 Suite for Mac. Can someone tell me why it is NOT a place to submit a question as it is here?

    Creative Suites Mac forum seems to be closed, so moved that Creative Suites Windows the Forum of Creative Suites "base".

    Then... Post your question and someone may be able to help... is your question about the installation of the old software on a new Mac?

    IF El Capitan Mac read below

    CS6 and previous programs have not been tested and will not be updated to run on Mac El Capitan

    -which means you are trying to use CS6 and earlier at YOUR risk of having problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    -IF not, Details of the message from the error messages and a person may be able to help (just not Adobe)

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but here are some links that CAN help with old programs

    -Java https://helpx.adobe.com/dreamweaver/kb/dreamweaver-java-se-6-runtime.html can help

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    -http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developer s-mac-os-x-0158095 /

    -the guardian https://support.apple.com/en-au/HT202491

  • script which gives the hostname with more CPU resources and memory available

    Hello

    Anyone have a script which gives the hostname with more CPU resources and memory available in the cluster?

    Concerning

    Vickie

    Hello, VicMware-

    You can get the host with the free CPU, or with the most free memory resources, using the following:

    ## get the host with the most free CPU cyclesGet-Cluster myCluster0 | Get-VMHost | Select-Object Name,    @{n="CpuMhzFree"; e={$_.CpuTotalMhz - $_.CpuUsageMhz}} | Sort-Object -Property CpuMhzFree -Descending | Select -First 1
    
    ## get the host with the most free memoryGet-Cluster myCluster0 | Get-VMHost | Select-Object Name,    @{n="MemGBFree"; e={$_.MemoryTotalGB - $_.MemoryUsageGB}} | Sort-Object -Property MemGBFree -Descending | Select -First 1
    

    The first would have produced something like:

    Name          CpuMhzFree
    ----          ----------
    myVMHost0          25384
    

    And the latter didn't would be out:

    Name           MemGBFree
    ----           ---------
    myVMHost4        122.323
    

    .. .or each of these host computers are those with the most free memory/CPU cluster, respectively.  What to do the things for which you are looking?

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • Script to list the information under Configuration/Storage/datastore details

    Hello, I'm trying to create a script that returns the details data Configuration/Storage/Datastore/store info. The thing I want the script to do is list my ESX:s, data of list store names, list mpathpolicy and the details of the data store paths section in the VI client.

    Is it possible to get this in a script? Or if anyone knows how I can get information from the info of paths in Details of the data store to the VI client

    Thanks in advance

    This is possible if you use the SDK.

    The following script lists the name of host, name of DS, political path and the number of paths.

    If you need other information on the page of details in the report let me know.

    $report = @()
    
    Get-VMHost  | Get-View | %{
         $esx = $_
         $esx.Datastore | %{Get-View $_} | where {$_.SUmmary.Type -eq "VMFS"} | %{
                   $ds = $_
                   $ds.Info.Vmfs.Extent | %{
                        $ext = $_
                        $extKey = ($esx.Config.StorageDevice.ScsiLun | where {$_.CanonicalName -eq $ext.DiskName}).Key
                        $lun = $esx.Config.StorageDevice.MultipathInfo.Lun | where {$_.Lun -eq $extKey}
    
                        $row = "" | Select ESXname, DSname, "Path Selection","Paths Total"
                        $row.ESXname = $esx.Name
                        $row.DSname = $ds.Name
                        $row."Path Selection" = &{
                             switch($lun.Policy.Policy){
                                  "VMW_PSP_FIXED"{"Fixed"}
                                  "VMW_PSP_RR"{"Round Robin"}
                                  "VMW_PSP_MRU"{"Most Recently Used"}
                             }
                        }
                        $row."Paths Total" = $lun.Path.Count
                        $report += $row
                   }
         }
    }
    $report
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • I'm not able to install illustrator creative cloud CC. This is the error when I download creative cloud app. "Cannot write the registry value. "Verify permissions, and then try again.

    I'm not able to install illustrator creative cloud CC. This is the error when I download creative cloud app. "Cannot write the registry value. "Verify permissions, and then try again.

    No one can tell you anything without the info adequate system or other technical details, including the exact error message.

    Mylenium

  • Firefox will not shoot to the top of page Add-ons and can never end updates.

    As others have had it, I had the same problem with Add-ons compatibility check after upgrading firefox. He has never progressed so I ended up following the steps, others responded to other issues by removing compatibility under the profile folder files, and other files. None which seemed to work. I found myself completely remove firefox and reinstall, but which did not help. I really need to install firebug, but when I try to download it just hangs up and never even begin to download. Hope this is enough detail. Thank you.

    I think it was more a problem with the Mavericks. I expect the next update and it finally did after that I asked this question. Everything seems to be back to normal now.

  • The Mercury Playback Engine GPU acceleration and activate mercury pass question

    So, I'm working on Windows 7 Professional 64 bit SP1 (my father built my desktop and here all the info I get off Speccy on its parts)

    -CPU: AMD Phenom II X 4 965

    Deneb 45nm technology

    -RAM: 8.00 twin DDR3 @ 669 MHz

    -Motherboard: ASUSTeK Computer Inc. CG1330 (AM3)

    -Graphics: VX2770 series j (1920x1080@60Hz)

    ATI Radeon HD 5700 Series (ASUSTeK Computer Inc.)

    -Hard drives: 932GB Seagate ST31000528AS peripheral ATA (SATA)

    -Optical discs: BD - RE of HL - DT - ST WH14Ns40


    Now, recently I'm subscribed to Adobe first CC 2015 and I open a project file that was originally a Mac computer (the disc has been formatted to be read by the PC and I got this done before so thing Mac PC should not be a problem)

    The first message, I thought "this project has been modified used with playback engine Mercury GPU acceleration (OPEN CL), which is not available or not certified on this system. Only Mercury playback engine software is used.

    I didn't know what to do with that I just said ok, just the project upward and running and everything is fine except the audio continues by cutting. He will play for about a minute on it before the audio starts to cut.

    I played a bit with my preferences and settings and preferences in reading, there is a setting that says "Enable mercury transmit." Thereby the option checked I get the audio cutting out (there are a few options with the audio device being Adobe DV or Adobe Desktop Audio sub and an option for the video device said Adobe DV and I can check or leave it disabled but results remain substantially the same.) Now I have it on Adobe audio, DV with Adobe DV checked and it goes a little long before audio cutting comes in)

    Now, if I uncheck Mercury Select pass he plays wise audio fine but after about a minute, playback stops. Literally paused, it is it's not freezing acts as I pressed pause when I touch my mouse or keyboard.

    I tried to do a new project and import all of the images in it to see if it would help, but the problem persists. My pictures comes from multiple sources, including a Sony DSLR and Iphones.

    Please tell me this is a fixable bug and Adobe CC is not incompatible with the office somehow.

    CineForm is a codec made specifically to be a "Digital Intermediate" or post-processing format. The company that created it was bought by the people of the GoPro and is used in some of their cameras. It is designed for the achievement of quality thanks to a multi-generation processing pipeline post, without loss of quality when a step is rendered on export to another station in the process.

    There were two objectives: one, it kept ALL quality through export operations repeated at a high-end professional examination and two that it was like 'light' on the processor of a computer while encoding off to play as possible. So it is not nearly as packed as many other codecs (like most H.264 & tel) and puts MUCH less strain on the CPU. It's usually large files, well that say not nearly as big as as DPX frames-based form. Does a little more direct work on the disc reading process to have been a bit bigger... but... This is a place you should have excess capacity in your system. We rarely have spare CPU capacity.

    To get it, you go to the website of the GoPro and download their free GoPro Studio, I think it is called and install. Who installs Cineform on your computer, and then you can transcode via the endoder that comes with PrPro, Adobe Media Encoder, which allows batch and same file transcoding and control things like a time for a process. Or you can do it via using Adobe prelude to ingest, rename and say: place the renamed files 'original' in a single folder permanent conservation while making another series of the same name but transcoded to X codec and laid in this case here to work with.

    Of course, you can use the (Mac) ProRes and DNxHD/R (PC) to work with, and in their larger versions, less compressed, they work just as well.

    All three codecs can be used for import in each program level pro, I know. PC cannot export ProRes that Apple will not allow the codec out of 'their' sandbox sand and DNxHD/R has been designed to work in Windows (although as ProRes, can be read / most of the Mac edition). CineForm works anyway.

    And as always in the work of pro, we deliver an export of output in that to the customer at the end of the job. If the original codec of the camera and the codec to work when editing... does not matter. Other than to be a step in the process.

    Neil

  • How to define the role of a resource (Portal and portlet)

    Hello world

    I have the name of the resource and I want a right of role to a resource (Portal, portlet, book...) but I don't know how to do this programmatically.

    Please help me. Thank you

    The code snippet below should help:

    ...
    Roles of ArrayList = new ArrayList();
    Roles.Add ("MyRole");

    SecurityPolicyItem spi = new SecurityPolicyItem();
    spi.setEntAppName (appName);
    spi.setWebAppName (webappName);
    spi.setResourceId("com_bea_p13n\tPortlet\tportlet2");
    spi.setRoleList (roles);
    spi.setCapability (PortalEntitlementConstants.VIEW);

    then use SecurityPolicyManager to create the security policy
    SecurityPolicyManager.createSecurityPolicy (spi);
    ...

    Best regards, Stefan

  • Calc script to copy the data members to his brothers and sisters


    Hi experts,

    I'm not planning Application, where the form I am Inputing "rates" on each month. Once again the rates that I enter must be copied to its years.

    Outline looks like:

    Account: Fx_rate

    Scenario: current

    Version: work

    currency: Local

    year: FY 13

    Time: Jan: Dec

    Company_code

    + E1000

    E1001

    E1002

    E.....

    E....

    E1000_rate

    + E2000

    E2001

    E2002

    E2000_Rate

    Here in the form of data to go rates on E1000_rate-> Jan-Dec

    E2000_rate-> Jan-Dec

    That should be copied in its years. As I said above, we have hundreds sibiling of fo for each rate.

    Could you please help me by writing the scenario of calc:

    Thank you

    Alex

    Hello

    In addition to Celvin post on the use of @SIBLINGS. When I had similar requirements, I realized the underside. Looks like a lot of code, but works well.

    / * First clearly rates against the entities before re them, filling with @REMOVE, remove the features of entry rate because you do not want to delete the. You will need to create a UDA called RATE_INPUT and assign it to all entities of entry rate * /.

    DIFFICULTY (current, work, Local FY13, @RELATIVE (YearTotal, 0), @REMOVE (@RELATIVE (Company_code, 0), @UDA (Company_code, "RATE_INPUT")))

    'Fx_rate' = #missing;

    ENDFIX

    / * Second aggregate up to level 1 entity values FX_Rate account, so that each parent rates holds the NOTE rate: the rate will have + for the aggregation.

    DIFFICULTY ("FX_Rate", current, work, Local, FY13, @RELATIVE(YearTotal,0))

    @RELATIVE (Company_code,-1);

    ENDFIX

    / * Difficulty third on Lev 0 company code and make the exchange of currency equal to their parents for the currency exchange value (which you gathered earlier) * /.

    DIFFICULTY (current, working, Local, FY13, @RELATIVE(YearTotal,0), @RELATIVE(Company_code,0))

    'FX_rate' = @PARENTVAL (Company_code, "FX_Rate");

    ENDFIX

    Try this

    Thank you

    Anthony

  • Assignment of a paragraph style to the text that you add to and block of existing text without changing the existing text? Using AppleScript.

    I have and added existing framework of text I want to add more text and at the same time assign a style to text.

    Then add more text to the same text frame later.

    I can do using 'set applied font statements' but what I want to do is to use styles for each entry.  Several times the styles are different for each addition.

    say application "Adobe InDesign CC.

    say history of parent of text block x of the page 1 of document 1

    the value apply fonts of insertion point - 1 for "Chalkduster".

    the value point size of insertion point - 1 to 12

    -character style from the insertion point to - 1 to the 'New' value - does NOT work

    the value content of insertion point - 1 to return & "Either Me!" & back -inserts after

    end say


    IndesignCC

    iMac OSX 10.9

    AppleScript

    Script debugger 5

    Xcode 5.1


    Thank you

    Mike

    -assumes the current paragraph ends with a return

    game of newText for "either Me!" & return

    say application "Adobe InDesign CC.

    say document 1

    the value storyRef to parent history of text frame 1 of page 1

    the value paraStyle to the style of paragraph 'new '.

    the value insertRef to the insertion point -1 of storyRef

    the value of beginIndex to index of insertRef

    say insertRef

    the value content to newText

    end say

    endIndex put to beginIndex + ( of newText length) - 1

    value textRef in (a reference for the characters thru of storyRef endIndex-beginIndex)

    the value applied paragraph style of textRef in paraStyle

    end say

    end say

  • Identify the role of use

    This is the question that the solution could be very useful. Is there a way to create a list of all the objects that they are actually assigned to roles in powershell? I ran the perl script in the roles of VMware VirtualCenter Management and permissions but this script displays all of the objects and the user/group and the associated role. For my environment, it took about 20 minutes to run and about 12 000 exported objects. I want to see is just assigned roles and the object that it is assigned to you, and not the child objects. I have not all objects, that objects actually assigned to a role. 12 000 objects are a lot of items to check when trying to find discreptancies. For example, if I have a role in the record of data centers, I want to see:

    #RoleName # #Object awarded to # #User or group given permission to #.

    Thank all in advance for the help.

    There are many ways to list the inventory of the environment of VI.

    You can list the 2 branches ("Hosts and Clusters" and "Virtual Machines and templates"), similar to the VI client show.

    See, for example, use get-inventory to get the store of data, cluster, resourcepool, vm in hirarchy

    Or you can use the list returned by the cmdlet Get-inventory.

    The example script below using the cmdlet Get-inventory.

    It filters the hidden folders, called 'vm' and 'host' since you can normally set permissions for these.

    
    filter Get-Permissions{
        $report = @()
         $object = Get-View -Id $_.ID
         if($object.Name -ne "vm" -and $object.Name -ne "host"){
              $path = get-path $object
              $perms = $authMgr.RetrieveEntityPermissions($object.MoRef, $false)
    
              if($perms.Count -gt 0){
                foreach($perm in $perms){
                  foreach($role in $authMgr.RoleList){
                          if($role.RoleId -eq $perm.RoleId){
                            $row = "" | select roleName, objName, principalName
                      $row.roleName = $role.Name
                      $row.objName = $path
                      $row.principalName = $perm.Principal
                      $report += $row
                    }
                   }
                }
            }
         }
         $report
    }
    
    function get-path($entity){
         $path = $entity.Name
         while($entity.Parent -ne $null){
              $entity = Get-View -Id $entity.Parent
              if($entity.Name -ne "vm" -and $entity.Name -ne "host"){
                   $path = $entity.Name + "\" + $path
              }
         }
         return $path
    }
    
    $authMgr = Get-View AuthorizationManager
    
    Get-Inventory | Get-Permissions
    

    Note 1: the order of objects returned is the order returned by the cmdlet Get-inventory.

    This can be changed by channeling the result of the Sort-Object cmdlet.

    
    Get-Inventory | Get-Permissions | Sort-Object -property objName
    

    Note2: the script returns not inherited permissions.

    This can easily be changed by changing the 2nd parameter in the RetrieveEntityPermissions method on $true

  • How does the role of 'Sender' with the ' I need to sign: last "option?

    I created a form in Adobe Acrobat DC which requires three explicit electronic signatures in order to complete:

    1. The seller, who prepares the form by filling in the initial details for order
    2. The customer, who fills in the additional contact information and confirms the correct order details and accept the terms and conditions
    3. Head of sales, who initially will send the document for signatures through the Services of eSign Adobe DC and sign to approve the order

    After some trial and error, I realized that the conversion of a form Acrobat DC to form DC eSign model ignores the role of "signatory" Acrobat DC and found the following roles to reflect without requires me to manually reassign any role field:

    Signatory Adobe Acrobat DC Adobe eSign Services DC
    sellerSignatory 1Participant 1
    customerSignatory 2Participant 2
    Head of salesSenderSender

    Sales Manager distributes the form on eSign DC site, select recipients sign decree entered and incoming email address of the seller, the follow-up by the customer' s. In addition, the head of sales checks that I sign and specifies that they will sign last. As far as my intuition and in the documentation research continues, it seems to me that everything should work properly at this point. However, when the form reaches the seller, it always assigns the role of Participant 1 to the sender fields, the result is that the seller is prompted to sign for them as the head of sales at this point. When the document reaches finally the sender, head of sales, for the signature, they are requested to do so in a generated signature field automatically rooted to the bottom of the form.

    A page of the documentation says that the role of Participant 1 are attributed to the sender fields if the sender says that they must sign First - which leads me to believe that it must interpret it as it's own participant role associated to the person sending the document when I sign last is specified. This response suggests to use the last role to this effect - but no role there, although involvement may be to use the role of Participant N , where N is total number of participants.

    So I have a few questions, here:

    1. What is the purpose of the role of the sender ?
    2. Should I be assigned the role of Participant 3 fields that the sender will fill last, instead?

    Hello Adamb90074111,

    According to my recommendation, I emphasize the use of Participant role creating model in EchoSign. Thus, the role of the sender would become 1 Participant (if the sender signs everything first) or participating "n" if he finally signed.

    Kind regards

    -Usman

  • Mapping of the external LDAP user with the role of the Complutense University of MADRID

    Hello WebCenter content masters,

    I'm having trouble mapping a group LDAP to the role of the Complutense University of MADRID.
    Let me explain the situation.

    I have an external LDAP (Apache DS) with two groups (groupofuniquenames), 'Administrators' and 'Test' and two users 'ldap_admin' and 'ldap_user '. ldap_admin is a uniqueMember administrators and the ldap_test a test uniqueMember.

    At the University Complutense of MADRID, I created a custom role 'Test' with privileges "RWD" group 'Public '.

    I guess that the external LDAP has been configured successfully as an LDAP authenticator provider - myrealm settings tab, since I can see groups and external LDAP users, and they can connect the DCU with their user id and password.

    However, ldap_user is unable to perform the check, and on their profile page, the role is "invited, authenticated."
    And when I pass ldap_user in the test group to the Administrators group, the role is then "invited, authenticated, admin, sysmanager, refineryadmin, rmaadmin, pcmadmin, ermadmin.
    It seems that the Administrators group is mapped correctly, but not the group test.

    I try to apply the advice given in these two threads:
    External LDAP user has only priviledge research at the Complutense University of MADRID
    Unable to map external users to roles in content Webcenter 11 g

    I have created a 'externalLdapMap' identification card, completed the provider.hda file and put the map "Test, Test". I also tried with "Test, contributor" that I was not sure about the first mapping.
    Whatever it is, after restarting the server of the University Complutense of MADRID, I'm still not able to grant the privilege of writing for a user to the Administrators group.

    I missed something in the process?
    Thank you for your attention and of course any help would be greatly appreciated.
    L.

    Hello

    I think that you have enabled the LDAP authenticator credits and that this error will go up.

    You must create an OpenLDAPAuthenticator and do the same settings with flag set up and then test the scenario.

    Thank you
    Srinath

  • How to get the role (Hall) of the currently logged in user

    Hello

    BPM 11.1.1.5 / 11.1.1.5 JDeveloper / ADF BC

    I created a BPM process with 3 user tasks and human tasks associated with them, which will have jspx pages ADF TaskFlows.
    There will be 2 roles (lanes) in the BPM process. 2 tasks for a single role and 1 for the other role.

    Users will connect to the workspace of BPM to interact with the process

    I created a .jsff located in a delimited TaskFlow.
    I dropped this taskflow as region in all pages for the 3 UI jspx pages so that the region is reused. (Basically all users see the same content)

    But the behavior of the content will be dynamic based on the roles of users, Process Status and maybe some data from the database.
    For example, I want to the fields in the editable region when the process is created by the first user.
    After that the process of submission, he goes to the next user for approval. Then the user with the approval role can modify it.
    At the same time, if the user who submitted the process opens the task, it should be visible as Readonly for him.

    User (initiator) region - creates data - is editable
    User B (critical) - customer data - region is editable. The user opens the task that he argued. It should be readonly for him.
    The user has - receives Notification - area is read only

    Then

    I want to know if it is possible to get the currently logged into the role of the user (as defined in the corridors) in the BPM process.
    I want to get these roles in the ADF UI project and use it on the expression of readonly property in the .jsff file.

    Thanks for any help.
    Concerning
    Sameer

    You can use the following EL fields readOnly property to->

    #{securityContext.userInRole []}

Maybe you are looking for