User Management API for unlocking/locking users
Hello All,
I am trying to develop an application where in a person should input the user id and check if the user is currently locked or unlocked. And also if it is locked, he should be able to unlock it. I want to know that, is there any UME API available for fetching the lock/unlock status and modifying it? I tried using IUsermaint but it does not returns the lock status. Any input on this? or may be a code snippet?
Thanks in advance.
Ameya
The setLocked() method mentioned above takes 2 parameters, a boolean and an int.
public void setLocked(boolean lock, int reason)
boolean parameter indicates whether to lock or unlock user. In above snippet, I have given it as false which is to unlock user. To lock the users, mention the parameter as true.
int parameter is to specify the lock/unlock reason.
Check javadocs for more details
http://help.sap.com/javadocs/nw04s/current/se/com/sap/security/api/IUserAccount.html
Regards,
Yoga
Similar Messages
-
Create and send an email as a delegate using EWS Managed API
Hi All,
I would like to create and send an email as a delegate using EWS Managed API for that i have crated one user as a delegate to that mailbox owner.
after adding user as delegate, when i try to create an email The EmailMessage class taking only FolderId as parameter but not taking Mailbox object as parameter. But in web reference they said that EmailMessage taking FolderId and Mailbox object as parameter.
EmailMessage message = new EmailMessage(service);
message.Subject = "Company Soccer Team";
message.Body = "Are you interested in joining?";
message.ToRecipients.Add("[email protected]");
message.Save(new FolderId(WellKnownFolderName.Drafts, new Mailbox("[email protected]")));https://msdn.microsoft.com/EN-US/library/office/dn641963(v=exchg.150).aspx#bk_createewsmacould you people please help me on this?ThanksNareshThanks for reply glen.
I have added delegate using Add-MailboxPermissions. Now i am able to save an email in mailbox owner drafts
folder.
Glen,
I have a one more question.(I am using EWS Managed API).
I(owner) have shared my calendar(eg. samplecalenderfolder) with another user(delegate) (i.e.,he is the
delegate of my mailbox) and i have given only permission to the this folder(samplecalenderfolder)
only and the permission level is Reviewer.
if i login with user(i.e.delegate) i am not able to get the shared calendar folders(i.e.,samplecalenderfolder)
that what i a have shared.
below is the code snippet i am using to get the calendar folders.
Folder folder = Folder.Bind(service,WellKnownFolderName.Calendar);
FindFoldersResults addtionalFolders = service.FindFolders(folder.Id, new FolderView(10));
could you please tell us how to get the shared calendar folders.
Thanks
Naresh -
Work Manager API in Sun Java Application Server 8.1
I am trying to build a parallel application using Work Manager api (javax.resource.spi.work.WorkManager;)
I studied the Websphere implementation of WorkManager there you need to make JNDI lookup for work manager and then use it to submit the work.
My question is if i make class which will implement the javax.resource.spi.work.WorkManager; interface and use that class to submit the work and execute it in parallel then will that class will handle the resource management and all j2ee services
Do we have separate implementation of work manager API for Sun Java Application Server 8.1 (any jar like asynch.jar in IBM websphere) so that we will just create a work manager using admin console and make JNDI lookup and use it
Please guide meBefore I start, disclaimer -- I have no knowledge of Hibernate and the following comments are based on the stack trace you have included.
I think your permissions might be set all right but you might have an error in the hibernate query. It looks like hibernate uses antlr to parse the queries. While parsing the query, antlr is encountering an exceptional condition and is trying to exit the VM (by calling System.exit()). Obviously, the hibernate code does not have that permission and therefore the exception is logged.
My guess is if you fix the query such that hibernate/antlr can parse it, you will not run into this error.
Hope this helps, -
HttpStatusCode from an EWS Managed API call
Hi there,
I am in the process of converting a service from using WebDAV to the EWS Managed API for data access to an Exchange server (client is moving from Exchange 2007 to 2013). This service polls a mailbox folder, does some processing on emails that arrive there,
and deletes or moves the emails once it is completed. The code I am working with has been using the status code from the HttpWebResponse returned from WebDAV requests for logging as well as handling WebExceptions (which have a response property for access
to the request status).
What I am wondering is whether the same status information is available for an EWS Managed API call - will calling Send() on a new EmailMessage always throw an exception if it is not successful? What are the common exception types to handle? So far I have
simply been assuming success or exception and handling the WebException to get a status code if one of those is thrown. I will be starting to test against the new code shortly but it would be great if I had a better idea of whether I need to do more to handle
call failures. I am quite new to developing against Exchange.
Cheers,
RichardThanks for the quick reply Glen.
Unfortunately none of the Managed API calls I'm making return ServiceResponseCollections which means there are no response messages for me to refer to so I'll just have to rely on the exception handling to log what has gone wrong.
The only ExchangeService method I'm calling is FindFolders() and I'm calling FindItems() on the Folder class and Send(), Move(), and Delete() on the EmailMessage class. The linked page does state that any methods that don't return a response collection will
throw an exception if the method does not complete successfully so I guess that is good enough for me.
But also in the page you've linked to it appears I should be handling ServiceResponseExceptions if I want to access the response (and its error code) to get more information about the cause of an exception.
It's a shame that the last ServiceResponseCollection from an EWS call is not available on the ExchangeService like the HttpResponseHeaders are.
Thanks again! -
Internal ArgumentOutOfRangeException in EWS Managed API
Dear Microsoft,
We’ve been happily using the EWS Managed API for one of our products, but recently ran into an obscure problem with it.
While forwarding e-mails always used to work flawlessly, we recently started getting the following, strange error at a client site: an ArgumentOutOfRangeException in some get_Item() method over 20 layers deep in the call stack.
Microsoft.Exchange.WebServices.dll version number: 15.0.516.14
The stacktrace:
System.ArgumentOutOfRangeException: index is out of range.
Parameter name: index
at Microsoft.Exchange.WebServices.Data.ComplexPropertyCollection`1.get_Item(Int32 index)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyCollection`1.UpdateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.UpdateFromXml(EwsServiceXmlReader reader, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.InternalLoadFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested)
at Microsoft.Exchange.WebServices.Data.ItemAttachment.TryReadElementFromXmlToPatch(EwsServiceXmlReader reader)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func`2 readAction)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.UpdateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyCollection`1.UpdateFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.UpdateFromXml(EwsServiceXmlReader reader, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.InternalLoadFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested)
at Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate`1 getObjectInstanceDelegate, Boolean
clearPropertyBag, PropertySet requestedPropertySet, Boolean summaryPropertiesOnly)
at Microsoft.Exchange.WebServices.Data.CreateItemResponseBase.ReadElementsFromXml(EwsServiceXmlReader reader)
at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ParseResponse(EwsServiceXmlReader reader)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalCreateItems(IEnumerable`1 items, FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode, ServiceErrorHandling errorHandling)
at Microsoft.Exchange.WebServices.Data.Item.InternalCreate(FolderId parentFolderId, Nullable`1 messageDisposition, Nullable`1 sendInvitationsMode)
at Microsoft.Exchange.WebServices.Data.EmailMessage.InternalSend(FolderId parentFolderId, MessageDisposition messageDisposition)
at Microsoft.Exchange.WebServices.Data.EmailMessage.SendAndSaveCopy()
The code that triggers it:
ExtendedPropertyDefinition pr_flags =
new
ExtendedPropertyDefinition(3591,
MapiPropertyType.Integer);
itemAttachment.Item.SetExtendedProperty(pr_flags,
"1");
itemAttachment.Name = originalEwsMailObject.Subject;
bodyBuilder.AppendLine("[product name etc. snipped] forwarded because: \r\n\r\n"
+ reason);
myMail.Body = bodyBuilder.ToString();
myMail.ToRecipients.Add(adminAddress);
myMail.SendAndSaveCopy();
Does anyone know how to solve this, or is it perhaps a bug in the API and should I report it somewhere?
Kind regards,
Tom Kersbergen
Docspo B.V.The Managed API is now open source so if you go to
https://github.com/OfficeDev/ews-managed-api clone the repository and compile a version to use in debugging then reproduce your problem you should be able to work out what's going wrong.
Its looks like its having problems reading the response so you may want enable tracing
https://msdn.microsoft.com/en-us/library/office/dn495632(v=exchg.150).aspx or watch the request/response with something like fiddler.
Cheers
Glen -
User management API/get all the users for a group
Hi all,
I'm trying to get all the users and their associated groups with the user management API. The method DirectoryManagerServiceClient.findGroupMembers(GroupMembershipSearchFilter)
returns all the users, great, but not the associated groups.
TO get the users i use the oid of a "super group" and this "super group" contains severals groups. It's the information about these groups i need.
I have read in the documentation of Principal Object that a search could omit
the group informations for efficiency. How can i bypass this limitation?
Thank you in advance for your help,
Philippe VandenhoveHi Philippe
Our CreateUser component will allow you to create local users and groups.
http://avoka.dnsalias.com/confluence/display/Public/Create+User+Create+Group
LookupGroup takes a group name or id, and returns a list of all members. I'm pretty sure it recursively evaluates contained groups, but you'll need to check. If it doesn't, log a bug to support-at-avoka.com.
http://avoka.dnsalias.com/confluence/display/Public/Lookup+DSC
Download at:
vhttp://www.avoka.com/apps/checkcookie?qpac=y&qpac_code=avokaESComponents&location=%2Fapps %2Fqpacdownload
Howard -
How to get list of Users[MailBoxes] in Exchange Server 2013 by using EWS Managed API
Hi all,
I need list of Users exists in my Exchange server 2013 , i.e Mail Box Users login name.
I was created Full Access permissions of all users to Admin user account, to access each user Mailbox programatically
i need the list of Mailboxes in exchange server .
MailBox mailbox = new MailBox("user");
Please share your ideasHi,
We can run the following command in Exchange Management Shell to get all user mailboxes name and export it to a .csv file:
Get-Mailbox -ResultSize Unlimited | Select Name,Alias,RecipientTypeDetails | Export-Csv c:\Users.csv
If you want to retrieve the list of users by using EWS Managed API, I suggest you can ask a question in Exchange Development forum for more suggestion:
http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
Regards,
Winnie Liang
TechNet Community Support -
Server unlocks locked users automatically - why ?
Hello,
I am using WLS 6.1 SP1
I have set Lockout Enable option to TRUE in Password tab of security.
I also have set
Lockout Threshold = 3
Lockout Duration=999999
Lockout ResetDureation= 5
and rest are default.
After invalid login in a span of 5 minutes, server locks the user.
I can see the status on the console server->Monitoring->Security tab
Total User Unlocked = 0
Locked Users = 1
But if try to login again with same (locked) user with or without correct
password,
the server unlocks user. Next attempt with correct password, user will be
successfully authenticated.
If you see in the console for server->Monitoring->Security tab,
Total User Unlocked = 1
Locked Users = 0
I have not used any unlock command.
Is there is anything wrong in the configuration or web.xml ?
Thanks
DeepakHello,
I found out one problem - Looks like a BUG
If Lockout Duration = 999999 then Server unlocks locked user automatically
during next login attempt
with correct or incorrect password.
This looks like a bug becuase
--- Value 999999 is the maximum value allowed and it accepts this value.
In the documentation, this value represented in terms of Seconds as the unit
of measurement
whereas actaully the <Lock Notice> is displayed in terms as 999'999 Minutes.
I tried with value 99999 (5 digits), it works !!!
Regards
Deepak
"Deepak Rampoore" <[email protected]> wrote in message
news:3C43A75F@mail...
Hello,
I am using WLS 6.1 SP1
I have set Lockout Enable option to TRUE in Password tab of security.
I also have set
Lockout Threshold = 3
Lockout Duration=999999
Lockout ResetDureation= 5
and rest are default.
After invalid login in a span of 5 minutes, server locks the user.
I can see the status on the console server->Monitoring->Security tab
Total User Unlocked = 0
Locked Users = 1
But if try to login again with same (locked) user with or without correct
password,
the server unlocks user. Next attempt with correct password, user will be
successfully authenticated.
If you see in the console for server->Monitoring->Security tab,
Total User Unlocked = 1
Locked Users = 0
I have not used any unlock command.
Is there is anything wrong in the configuration or web.xml ?
Thanks
Deepak -
Accessing the user management API programmatically
I am looking for the officially supported method that could be used to access the user management API via "curl" for CRX:
There is a user management API described here:
http://sling.apache.org/site/managing-users-and-groups-jackrabbitusermanager.html
However, executing a command on CRX 2.2 such as:
curl -u:admin:admin http://localhost:7402/system/userManager/user.tidy.1.json
Only returns a message indicating that the contents have been redirected (without providing another URL).
Using the Content Explorer in CRX shows the list of users at: /home/users but I am not sure if a curl command could access the user list via that URL.
Any pointers on how this could be done are appreciated. This is for a partner.
Regards,
BlairI am a co-worker of MorrellJ. I am trying to do a change password request using the Jackrabbit User Manager with the REST URL /system/userManager/user/<username>.changePassword.json. The problem I am having is that this request requires an oldPwd form param in the request. The issue is that when I am trying to do this request it is in response to the user selecting "Forgot Password" so our logic has created a random password which we then email to the user so they can use that the next time they want to login. We need to change that user's password in CRX so they can log in using it next time. Since they haven't logged in there is no session, NOT the problem. THE PROBLEMS, I don't know 1. how to use the userManager to get that user's old password, since /system/userManager/user/<username>.json doesn't appear to return the password and 2. if I could get the old password it most certainly will be encoded, some how, so I will need some decoding algorithm to pass it through in order to get the actual password to set as the oldPwd form param to my change password request. Please let me know if you require any further explanation. Any assistance would be greatly appreciated. Thank you, in advance, for your assistance.
Sincerely,
Mike Sucena
[email protected] -
Hello,
could you please tell me how I can create Groups and add users to, within EP, using the User management API ?
do you have a javadoc on the User management API ?
best regards,Here's sample code for adding users to a group:
// assign individual user to a Group
String userid = "<unique-id of user>";
String groupid = "<unique-id of group>";
IGroupFactory grpFact = UMFactory.getGroupFactory();
// add the user
grpFact.addUserToGroup(userid, groupid);
// get rid of the user
grpFact.removeUserFromGroup(userid,groupid);
Note: the unique IDs are obtained by searching for the user or group. You can also use the appropriate factory (e.g. UserFactory)
The IDs look something like:
GRUP.CORP_LDAP_2.cn=developers,ou=groups,dc=sap,dc=corp
or
USER.CORP_LDAP.uid=i802895,ou=people,dc=sap,dc=corp
So:
String uid = "i802895";
IUser user = UMFactory.getUserFactory().getUserByLogonID(uid);
String uniqID = user.getUniqueID(); -
Background job for auto lock user
Dear Friends,
Which background job i have to be schedule for auto locking user after every 30 days if then are not logged for last 30 days.
Thanks,
Regards,
SachinHi, Sachin.
Please check this thread.
Locking users if they did not login for 15 days
Best Regards.
Sejoon -
Get list of User Mailboxes in Exchange server 2013 by using EWS managed API
Hi all,
I need list of Users exists in my Exchange server 2013 , i.e Mail Box Users log in name.
i know the command in Powershell to get list, but i need this using code[ ews managed API].
How can i achieve this ?
Please share your ideasHi Glen,
i follow your suggested links i wrote below code ,
here i am getting error
The term 'Get-Users' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
SecureString password = new SecureString();
string str_password = "EIS2014!@#";
string username = "[email protected]";
foreach (char x in str_password) { password.AppendChar(x); }
PSCredential credential = new PSCredential(username, password);
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://ExchangeServer.admin.com/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential);
//connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Basic;
Runspace runspace = RunspaceFactory.CreateRunspace(connectionInfo);
PowerShell powershell = PowerShell.Create();
PSCommand command = new PSCommand();
command.AddCommand("Get-Users");
command.AddParameter("ResultSize", 50);
powershell.Commands = command;
runspace.Open();
powershell.Runspace = runspace;
var aa = powershell.Invoke();
Please help me. -
API for Work Order status from Released to Unreleased or any user defined s
Dear All
Is there any API for to change work order status from Released to Unreleased or any user defined status.
Take care
AamirHi Ben,
As query is resolved, you should close the Thread after rewarding to the Concerned
Thanks,
Manish -
When I try to edit preferences iTunes for Windows locks up. I have only one user. This is true even after a reboot.
Hello MF7642,
Thank you for contacting Apple Support Communities.
You can use this article to troubleshoot your issues with iTunes.
iTunes: Missing folder or incorrect permissions may prevent authorization
http://support.apple.com/kb/TS1277
Regards,
Jeff D. -
CUP 5.3 - Mandatory RA for Unlock User Workflow Faulty
Good day All.
I have a mandatory Risk Analysis on Workflow stage Unlock User account that is not working. The workflow is supposed to request a mandatory Risk Analysis from the CUP request Approver.
My config is as follows;
1) Request Type = Unlock Acc with Assigned Action, Unlock_User
2) Workflow Initiator =Unlock Acc with Attribute, Condition = And, Attribute = Request Type & Value Unlock Acc
3) Stage = Unlock Acc with Additional Config > Risk Analysis Mandatory = Yes*
4) Path = Stage 1 > Unlock Acc
I have re-created the Initiator, Stage and Path, but the problem still persists. Please advise.
Many thanks,
Mike HannieGood day All.
Please see the update from SAPAG Below - There could be a bug in the CUP Workflow for Unlock Acc
09.12.2009 - 22:10:09 CET - Info for Customer by SAP
Dear Michael,
I am sending my analysis results to the support developers after
testing internally. Analysis is not triggered in an unlock request.
The next update you receive will be from them.
Thank you in advance for your patience.
Warm Regards,
Kelly Erickson
Customer Assurance
Governance, Risk, and Compliance
SAP BusinessObjects Division
Regards,
M Hannie
Maybe you are looking for
-
HT5552 How can I use an iTunes gift card to buy tv shows on my iPod touch?
Or do I need to buy the tv shows on a computer, with an iTunes gift card? Is it possible to buy the shows on my iPod touch? Thank you.
-
Color Laserjet Pro 100 (M175NW) looses wireless connection
Hi, the printer goes offline from the local wlan after working ok 12 to 24 hrs. symptoms: * wireless LED on the printer blinking after waking the printer with the ok button * wireless status page: not connected * wireless status page: no wireless la
-
OBIEE 11g How to Exclude/Include Multiple columns on BI Report at Run Time
OBIEE 11g How to Exclude/Include Multiple columns on BI Report at Run Time
-
Toolbar Button/Tab Spacing in Skin
Hi, all, Is there a method for decreasing the spacing between the buttons or tabs on a skin's toolbar? I'm trying to create a layout that makes the tabs appear to run together, but I can't seem to find a way to eliminate the spacing between them. I'v
-
URGENT:Process Chains And events Related
Hi All, I have created a new process chain which is a normal ODS Process Chain.For that I started with the start Process and then created event in sm62 to trigger the start of process chain.Similarly,I have at the end of the process cha