cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign/remove role from user using a service?

0 Kudos
382

Instead of going to MII menu -> search for user -> select user -> select tab "Assigned Roles" -> Modify -> Add|Remove -> ... -> Save

I would like to use an MII service. Is there any? If yes, what is the syntax for adding/removing a role?

Accepted Solutions (0)

Answers (3)

Answers (3)

agentry_src
Active Contributor
0 Kudos

Hi Tibor,

I thought that you had managed to create the queries to use those two services. I will go into more detail.

Create an XMLQuery. There should be an available Server named as XMLConnector for you to select and set Mode = XMLQuery. If you do not see the XMLConnector, then go to the MII Portal and check your Data Services - Data Servers to make sure XMLConnector is Enabled and showing a green check mark.

Go to the XML Query Details and paste the following into it:

/XMII/Illuminator?service=admin&mode=RoleList&Group=[Param.1]&Content-Type=text/xml

Add your MII ID (or a test user) to Parameter row 1. No quotes are necessary.

Give this a try. After doing a little research and testing, I still think ProfileEditor is the way to go, but it does not look like I either have permission or it has been decremented.

This same format should be used with all the services in that document.

Cheers, Mike


agentry_src
Active Contributor
0 Kudos

Profile Editor is the one I would recommend using. Substitute [Param.1] for the user and [Param.2] for the Payload. Then pass the content via the Parameters. The configuration of the Payload is most likely the same as the FullProfile service, but might be similar as the RoleList. I don't have the ability to test this, so if you can post the results, I may be able to help further.

Cheers, Mike

0 Kudos

Sorry but absolutely have no idea how to use the "ProfileEditor" or the "Payload". There's no such an example on the internet.

agentry_src
Active Contributor
0 Kudos

Ordinarily I would not just paste a link, but this document is a little more difficult to find than searches for other solutions.

https://blogs.sap.com/2013/01/02/illuminator-services-of-sap-mii/

Cheers, Mike

former_member292526
Discoverer
0 Kudos

thanks for this, I saw this, but I would like to know the details...the mode is maybe "ProfileEditor" ? in this case what is the "PayloadXML" ?

agentry_src
Active Contributor
0 Kudos

The document is pretty comprehensive. Start with something simple like logged on Users or Admin Users list to get used to using the xml queries. Then try with the ProfileEditor or whichever other service you think would work. If UME is connected to an outside Access and Authentication processor like LDAP, you may have problems, but the way you described what you do normally would indicate this is not the case. You can use the [Param.X] in the xml link for passing variables.

0 Kudos

Then maybe we have different understanding about "comprehensive". According to me that page is very poor regarding details. Let's have "user1" and "role1", then the following call will list all info about "user1" (also "role1" will be displayed if "user1" has assigned to himself):

http://some_mii_system:50000//XMII/Illuminator?service=admin&mode=FullProfile&Group=user1&Content-Ty...

and the following call will display all the roles:

http://some_mii_system:50000/XMII/Illuminator?service=SystemInfo&mode=RoleList&RowCount=1000&Content-Type=text/xml

But I would like to add/remove "role1" for "user1". What's the syntax?

Thx

agentry_src
Active Contributor
0 Kudos

Comprehensive in that the list is very complete. I agree that much more could have been done with instructions and samples.