I am trying to access some services that require a google login. I thought it would be a really neat idea to automate it and have been trying to do so. Whenever I use my script to launch my service its asking me to sign in with google account. I am tried to automate that also in automation but I am getting captcha . Please someone help me in do this.
I have tried in one way:
By default, ChromeDriver will create a new temporary profile for each session. Manually u won't get sso as it is using stored cache. So the solution is u need to create and load custom profile
Something like this
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=/path/to/your/custom/profile")
Note : Its work fine when I run in single thread but When I am running in multiple thread I am getting an error message saying "Directory already in use".
Related
I'd like to create MS Teams meetings from another application.
The Teams application is running on the computer, outlook is not used though.
How would I accomplish this the best / easiest way without (much) user interaction?
As far as I can see, the best option would be to use the REST API to create a meeting using the api-URL https://graph.microsoft.com/v1.0/me/events.
If I can also create a meeting commandline or by COM objects or something else, I could do that, too.
So here would be what I did for research with graph so far:
I can log on to https://developer.microsoft.com/en-us/graph/graph-explorer and use my user to create meetings and get the response. To do that, I modified the permission to read / read-write the calendar. If I copy the access token and use it with a powershell Invoke-RestMethod, it also does what I want. I can do the same with Connect-Graph -Scopes "Calendars.ReadWrite". But it would show this big browser windows about the login as X.
I read about apps, but if I use the apps ID and so on to log in silently, it seems like I am not in the current user scope but in a process scope and that's different. At least I set the API permissions up to also have access to Calendars.ReadWrite via Microsoft Graph, but I get an Access denied error if I try to run the same New-MgUserEvent to create a meeting for the current user (that is running the local powershell).
If use the token with Connect-MgGraph, it displays the client and tenantID and the ContextScope is process, not current user, so that would fit.
If I understand it correctly, I could use the token to get another one for a user... (reference is this: https://learn.microsoft.com/en-us/graph/auth-v2-user )
If I use the Connect-Graph -ForceRefresh parameter (which I guess would do the same, the popup tells me I'm logged in as the current user (not process).
This is a bit odd, so before I try to use the rest api and fumble a bit around:
Can I use the example from the link to refresh the token to get a user token that has the rights that I defined (and be able to access the calendar)?
Or is there some misunderstanding on my part?
Would it be a better idea to just use something like powershell, have the user log in once per day and leave the process in the background and create the new entries from there?
Do you have to refresh a token when you use connect-graph? Or could that be done better by Rest web api, if I can export the token?
The idea of having an app that would have access to all calendars would seem like a bigger security risk and I'd kind of want to avoid that. If I could configure the apps to have access to only one specific calendar, that would be cool, too. But I did not find it when looking around.
Thanks and best regards to all that took their time to read and consider to help.
Iam developing a SAP CF app and wnated to capture session timeout and show pop-up to user before session timeout happs to either refresh the session or execute the logout ,but setting the env variable SESSION_TIMEOUT as given in the link is also not working neither central logout is triggered :
https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/0aac697f0cf7444193ed5eb0fc6e5bd0.html#loio0aac697f0cf7444193ed5eb0fc6e5bd0__section_blz_hgn_mv
cf set-env SESSION_TIMEOUT 1
it is not triggering the central logout endpoint configured in xs-app.json. My client initiated central logout is working as expected.
please help with any suggestions and pointers ,my requirement is to capture central logout event on session expiry and show popup to user to either refresh the session or execute logout but this is not working in SAP Cloud foundry environment ,please help.
To be honest, I have no experience about this.
But the link provided (https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.03/en-US/5f77e58ec01b46f6b64ee1e2afe3ead7.html#loio5f77e58ec01b46f6b64ee1e2afe3ead7__section_imh_gsy_lv) is about the app router configuration.
It says,
The sessionTimeout property is no longer available; to set the session time out value, use the environment variable .
Therefore, I would try to set the environment variable for the app router as well, e.g., via the manifest.yaml.
The documentation you linked to is for the HANA XS advanced model, which I think is different to the approuter used on Cloud Foundry. Therefore, I'd assume that the documentation won't help you much.
Adding an environment variable to your app alone won't do much either, I fear. Unless you tell your app to do something with that.
Bottom-line: I think you need to implement that functionality yourself.
I have 3 instances:
1.- app web (ubuntu instance)
2.- keyrock instance
3.- spagobi instance
My spagobi instance works validating users with keyrock as the same as App web. I create some reports in it. Now, i need to get these reports to insert into my app web.
Im trying to use http://docs.spagobi.apiary.io/, The preview subresource option. But all times i have a modal window asking my user/pass (as a apache security option).
im using http://spagobi-url/SpagoBI/restful-services/2.0/documents/printers_visited/preview (printers visited is the label of my document). And results:
If i wrote my user/pass in this panel, validation dont work and tries as a loop.
Anyone know how to solve this?
the REST services provided by SpagoBI require basic authentication, that's why you see the modal window asking for credentials.
In order to avoid this, you should implement a SSO between your application and SpagoBI and open a session in SpagoBI: when the session is opened, you should be able to invoke REST services.
Pay attention to the fact that preview subresource is just a static (optional file), it is not the executed report: if you want to execute the report, you should get the content subresource.
Just to let you know, we are currently developing possibility to invoke REST services providing the OAuth token. This should be available in next release.
Hope this helps
I want to get the login ID of the current user in OTRS. I dont know nothing about the Framework and Structure of OTRS. Tried to Google a lot but as I dont have any background in Perl I didnt understand anything. Just want to know How can I print or return Login ID of current user in OTRS.
You would want to write your own frontend module. From within the frontend module the active customer user is available as $Self->{UserID} and you can use it to call the remote webservice.
You can use remote web services via the WebUserAgent object.
Please note that writing OTRS modules is fairly easy but does require some effort. The question you had is really very basic and you could have solved it just by looking at other code in the framework.
I have a GWT app to deploy to Tomcat on a Windows server, with the following requirements:
1- The app should work fully, whether the user is in the Windows domain or not;
2- If the user happens to be in the domain, the app should be able to identify the user in some manner. Presumably, this should be via getThreadLocalRequest().getRemoteUser(), but any other alternative is fine...
3- If the user happens to be in the domain, the app should be able to access the MS Exchange server in that domain, without requiring the user to enter their password.
I've scoured the web high and low for this, but unfortunately, it seems there's no way to get authentication without forcing authentication. There are many examples of exclusions for, say, a login form or other "public" resources, but that won't work for us, since all the resources in a GWT app are packed into the same "page".
Maybe it's my limited understanding that's making me fail in some basic way, but I've tried to look at JCIFS, Jespa, Waffle and SPNEGO, and I just can't seem to get working the way I want to...
Any help would be greatly appreciated.
Cheers,
J.
How about putting a Javascript on your front page and have a Kerberos/SPNEGO protected page. The javascript will attempt to request a protected page, if the user is on the domain you will get the correct result from the page otherwise you will get 401 access denied. In the former case you can redirect your browser to exchange page, or have another AJAX call to retrieve things from exchange server in the later case you either show a log-in form or a generic anonymous page.
What about using JNI to call the Win32Api function LogonUser?
By doing impersonation at the thread level you will have the NTLM token added to the current thread and you would be able to call exchange with no issues