Error 401--Unauthorized

I add security to my ADF application. Login.jspx is the first page which does not has PageDef file. Welcome.jspx is the second page. I drop a panelTabbed with a showDetailItem to it. Then, I create a taskflow with only one view and drop it to that showDetailItem.
I create a welcome.jspx without PageDef. I create a user named jcooper. I have an application role named myapplicationrole and an enterprise role named myenterpriserole. I map myapplicationrole to jcooper and myenterpriserole.
Can anyone tell me the detail steps of adding security to taskflow of a jspx ? I create a taskflow named staff-task-flow-definition which has staff.jsff. staff.jsff has PageDef named staffPageDef.xml.
I can use jcooper to login in the login.jspx. However, after login, I get errors as follow.
I do not assign any premission to webpage and taskflow in the Resource Grants Tab of jazn-data.xml
What I need to do is adding two showDetailItem. Each showDetailItem has a taskflow. One taskflow is for manager, the other is for staff. How to set application role, enterprise role, and users to this application?
----------------------error---------------------------------------------------------------------------
Error 401--Unauthorized
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.2 401 Unauthorized
The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is explained in section 11.

You might find them useful:
http://one-size-doesnt-fit-all.blogspot.com/2009/01/configuring-jdev-11g-adf-security-app.html
http://andrejusb.blogspot.com/2008/10/adf-security-11g-and-adf-business.html
NA
http://nickaiva.blogspot.com

Similar Messages

  • Error 401--Unauthorized when deployed on WL Managed server (10.3.3)

    Hi,
    I created & started a WL-Managed server on my window desktop machine. I deployed to this Managed server, an application which is running without problem on Admin Server. (The managed server is created in the same Domain as that of Admin Server)
    However, when I log on to the application on Managed server & enter the UID & PW I get the Error 401--Unauthorized page. The same security works perfectly well for Admin Server.
    Any clues what could be going wrong.
    Thanks in advance.
    Edited by: Prakash Chavan on Feb 28, 2011 4:57 PM

    Thanks Faisal,
    Here is the log after I add the 2 flags
    <Mar 1, 2011 8:59:30 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server stat
    e changed to RUNNING>
    <Mar 1, 2011 8:59:30 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server star
    ted in RUNNING mode>
    Mar 1, 2011 9:13:27 AM oracle.jbo.uicli.mom.CpxUtils$Visitor logMainApplicationC
    px
    INFO: zip:C:/JDev11g/Middleware/user_projects/domains/base_domain/servers/Svr0/t
    mp/_WL_user/TestTrackApp_V2.0/77qs7f/war/WEB-INF/lib/_wl_cls_gen.jar!/view/DataB
    indings.cpx
    [JpsAuth] Check Permission
    PolicyContext: [TestTrackApp#V2.0]
    Resource/Target: [view.pageDefs.ttsPageDef]
    Action: [view]
    Permission Class: [oracle.adf.share.security.authorization.RegionP
    ermission]
    Result: [FAILED]
    For more information on this failure, please set -Djps.auth.debug.verb
    ose=true
    I have emailed you the requested log & the config files.
    Edited by: Prakash Chavan on Mar 1, 2011 9:35 AM

  • The remote server returned an error: (401) Unauthorized

    We are attempting to upload a file to SharePoint on Office 365 and get the following error:
    The remote server returned an error: (401) Unauthorized.
    We also tried using NetworkCredentials and that got the following error: The remote server returned an error: (404) Not Found.
    The code is shown below.
    Any idea on to fix this error?
    public
    void uploadDocument(string
    siteurl, string username,
    SecureString securepassword,
    string domain,
    string filestreamPath =
    "NewDocument.docx",
    string serverRelativeUrl =
    "/Shared Documents/NewDocument.docx")
    ClientContext context =
    new
    ClientContext(siteurl);
            //context.Credentials = new NetworkCredential(username, securepassword, domain);
    context.Credentials = new
    SharePointOnlineCredentials(username, securepassword);
    using (FileStream
    fileStream =
    new
    FileStream(filestreamPath,
    FileMode.Open))
    ClientOM.File.SaveBinaryDirect(context,
    serverRelativeUrl, fileStream, true);

    Yes, it has access.  In fact, it has no problem getting the site properties using the code below.  It is just when I am uploading a file that the error occurs.
    public Web getProperties(string
    siteurl, string username,
    SecureString securepassword)
    Web web = null;
    // Starting with ClientContext, the constructor requires a URL to the
    // server running SharePoint.
    ClientContext context = new ClientContext(siteurl);
    // The SharePoint web at the URL.
    web = context.Web;
    // We want to retrieve the web's properties.
    context.Load(web);
    // Execute the query to the server.
    context.Credentials = new SharePointOnlineCredentials(username, securepassword);
    context.ExecuteQuery();
    return web;

  • The remote server returned an error: (401) Unauthorized error while using Microsoft.SharePoint.Client.dll

    I have access to sharepoint site and I have tested this by manually creating the lists and announcements in the sharepoint site.
    now the same thing when I try to do it through the c#.net code it always gives me the following :
    "An unhandled exception of type 'System.Net.WebException' occurred in
    Microsoft.SharePoint.Client.dll Additional information: The remote server returned an error:
    (401) Unauthorized."
    My code looks like below:
    string userName = "[email protected]";
    SecureString password = new SecureString();
    foreach (char c in "abc123".ToCharArray()) password.AppendChar(c);
    using (var context = new ClientContext("https://sharepoint.partners.extranet.adlabs.com/sites/UniTest"))
    context.Credentials = new SharePointOnlineCredentials(userName, password);
    context.Load(context.Web, w => w.Title);
    context.ExecuteQuery();
    Krrishna

    Hi Krrishna,
    You code is used to access SharePoint Online, if you are use SharePoint 2007, we can use SharePoint web service or custom web service to achieve your requirement. 
    Lists Web Service
    http://msdn.microsoft.com/en-us/library/lists(v=office.12).aspx
    Creating a Custom Web Service
    http://msdn.microsoft.com/en-us/library/ms464040(v=office.12).aspx
    About SharePoint 2007(MOSS 2007), you can also post it to the forum below, you will get more help and confirmed answers there.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=sharepointdevelopmentlegacy
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Call Adapter Error - 401 Unauthorized

    Hi,
    We are using Multi Mapping where it splits 1 message into n messages. The n messages split by this scenario in trun calls another scenario configured in the same PI server using SOAP Adapter.
    The called scenario is SOAP --> Siebel using iWay Adapter.
    When the number of messages split are huge in order of thousands, the server is going for a toss and the called scenaio is failing at Call Adapter Step in IE with HTTP Error 401 Unauthorized. Few of the messages manage to pass successfully.
    Anticipating your valuable inputs.
    Thanks.
    Regards,
    Sudharshan N A

    Hi Sudharshan,
    There can be different reasons for getting HTTP 401: Unauthorized error. As you said, few of the messages are being passed to the called application, I would request you to check the scalability of the Seibel Server.
      Also if you are using a connections from a connection pool, then it may be that the pool itself is getting exhausted, though mostly we get Socket exception/Connection Exception/IO Errors in these cases.
      The other reasons can be that the user you are using to connect Seibel dont have enough permissions. But it is ruled out as you said some messages have been processed.
    If the Seibel server is SSL enabled, and your PI doesn't have any certificate configured, then also you may get such errors.
    Regards,
    Sugata

  • SOAP Sender Adapter gets error '(401) Unauthorized.'

    Hi all,
    we are using XI 3.0 and have a scenario with a SOAP Sender Adapter, which is using "HTTPS with Client Authentication". I have configured everything I have found on the forum at Visual Admin and Integration Directory:
    Set the UME property ume.logon.allow_cert to TRUE in 'Service-->UME Provider'
    Imported client certificate and root CA certificate to 'Service-->Keystore'
    Created user with role role SAP_XI_APPL_SERV_USER
    Assigned this user to the client certificate in 'Security Provider-->UserManagement'
    Added the user to xi_adapter_soap_message and xi_adapter_soap_help in 'Security Provider'
    Added the root CA in 'SSL Provider>Dispatcher>Client Authentication' and marked 'Request client certificate.
    Added the user to BusinessSystem at tab 'Assigned Users'
    Added the user to Sender Agreement at tab 'Assigned Users'.
    Our business partner got a certificate of our server and the according PrivateKey is added to 'SSL Provider>Dispatcher>Server Identity'
    Unfortunately, our server certificate is not verified by an root CA!!
    When the business partner now browse the URL 'https://url:port/XISOAPAdapter/MessageServlet?channel=:BS_3RD_PARTNER:SOAP_SENDER&nosoap=true' on his system, he will get a 'Message Servlet is in Status OK'.
    But when he tries to process the URL directly in his messaging system, he gets an error '(401) Unauthorized.' 
    Any hints what could be the problem between browing the URL in InternetExplorer and sending from the messaging system?
    Does it really mean that authorization was successful, when getting  'Message Servlet is in Status OK' in the Browser?
    How can I assign an user when not using ClientAuthentication?
    I would be very thankful for every help...
    Grtz, Juergen

    Hi Satish,
    could the user or password also be wrong, even if you get 'Message Servlet is in Status OK' when browsing the URL in the Internet Explorer? I would have seen this as a sign, that the user authentication works basically...
    Is there a special place to store the password in the Visual Admin, or will the password be used, which is available in the SU01 ?
    Grtz,
    Juergen

  • The remote server returned an error :(401) unauthorized in Provider hosted app deployment

    Hi,
    We are trying to deploy the provider hosted app in server environment . we are getting the "The remote server returned an error :(401) unauthorized" error after deploy the app in server.
    stack Trace:
    [webException:Te remote server returned an error:(401) UnAuthorized.]
    System.Net.HeepWebRequest.GetResponse().
    Followed the same MSDN steps , but sill same error. We have attached the certificate and using the same issuer ID in the app web.config.
    Verified the IIS setting and still getting the same error when we call the "Clientcontext.ExecuteQuery()" method.
    Same code is working fine in my Local dev environment.
    If anyone have idea about this issue, please let me know.
    Thank you,
    Mylsamy

    Hi ,Thank you for your response. We have tried all the options and everything is same (Client ID,Issuer ID...etc) and finally figured out the issue.The below link saved my day.http://msdn.microsoft.com/en-us/library/office/dn762439(v=office.15).aspxIn "TokenHelper.cs" GetRealmFromTargetUrl method always return null andWhen we analyze the issue we found some variable name assigned for "Realm" Instead of GUID in SP server.Power shell command to get the Realm in SP server:  Get-SPAuthenticationRealmWe have followed below article to generate the new GUID for realm.http://technet.microsoft.com/en-us/library/jj219756(v=office.15).aspx$c =Get-SPServiceContext -Site "http://<websiteurl>"Set-SPAuthenticationRealm -ServiceContext $c -Realm "a686d436-9f16-42db-09b7-cb578e110ccd".
    Thankyou,Mylsamy

  • The remote server returned an error: (401) Unauthorized. while running client context using sharepoint client object model

    Hi,
    I have started using the client object model so that i do not have to go to sharepoint admins to perform some basic operations on remote server. While assigning list item level permission i am getting following error, could you please help. thanks.
    The remote server returned an error: (401) Unauthorized.
       at
    System.Net.HttpWebRequest.GetResponse()
       at
    Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
       at
    Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
       at
    Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
       at
    SetDowntimeItemPermission.SetPermission.Main(String[] args) in

    it seems your request was unauthenticated i'm not sure are you using a web application with FBA or desktop application my suggestion would be try to impersonate your request by passing network credentials (COM works on network credentials )
    NetworkCredential credentials = new NetworkCredential("username", "pwd", "domain");
    ClientContext context = new ClientContext("http://site-url");
    context.Credentials = credentials;
    Best Regards, Ashutosh | SharePoint World

  • The remote server returned an error: (401) Unauthorized. + Web Service userprofileservice.asmx

    Hi Community,
    I need you assistance on an issue I'm facing.
    The remote server returned an error: (401) Unauthorized.
    The remote server returned an error: (401) Unauthorized.)
    I'm connecting to a web service (userprofileservice.asmx) to auto populate email address in an Info Path form. It was working fine Friday/Monday. Open the form today and I received error:5566
    It's populating in preview but when I open the form in the browser (info path web part) that's when I receive error:5566
    I need your help guys please, this is doing my head in.
    Cheers Matt
     

    Not sure how you do that?
    I'm using SOAP UI to test I can connect to the web service and check the envelope request
    details. Before it was giving me 401 error until I granted my account permission to that asmx on the web server.
    It's strange because I can connect to the web service by soap UI and see all the information.
    I can connect to the web service by using the URL.
    Works fine in preview mode. 
    Was working fine on the production environment until yesterday and now I have error 5566.
    All the configuration on the web server is the same.
    I'm at a brick wall.. Help

  • ALUI-Create Web Service - Remote Portlet Error 401:Unauthorized

    I have some problems during user ALUI(AquaLogic User Interaction 6.1).
    I created a Web Service - Remote Portlet,then set value of Basic Authentication Settings is "User's Basic Authentication Information". When related remote server refer to tomcat5.5,the Web Service - Remote Portlet is fine to run,but not when the related remote server refer to weblogic9.2.
    When value of Basic Authentication Settings is "Use Remote Server Basic Authentication Information", related remote server refer to weblogic9.2 or tomcate5.5, the portlet is fine.
    error detail:
    Error
    sso Portlet cannot be displayed because the remote server returned an invalid HTTP response code.
    We recommend:
    • Refresh sso Portlet
    • Accessing this portlet at a later time.
    • Contacting your portal administrator if problems persist.
    Detailed error information
    • Response status: 401
    • Response body:
    Error 401--Unauthorized
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.2 401 Unauthorized
    The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is explained in section 11.

    How to configure remote server to accept authorization header?
    I set value of Basic Authentication Settings is "User's Basic Authentication Information" because the Web Service - Remote Portlet need to get the portal's login user infomation.If the value is "Use Remote Server Basic Authentication Information",the application is fine to run.
    The follow is the way to get login user infomation.
    IPortletContext portletContext = PortletContextFactory.createPortletContext(request, response);
    ICredentialProvider cProvider = portletContext.getCredentialProvider();
    String username = cProvider.getUsername();
    String password = cProvider.getPassword();
    Do you have other way to authenticate users?
    Thanks.
    Edited by: user2233298 on 2009-4-22 下午8:25

  • REST call in FBA WebApp returns error 401 unauthorized

    Update:
    I found out that this is happening only in a webapplication where FBA is activated. How can this be related? As soon as I deactivate FBA, 401 is gone.
    Hello,
    I'm trying to do a very basic REST call from a Console application to my SharePoint 2013. As I understand, that might be already the problem, as I'm having a hard time to authenticate my console app using oauth (which is necessary if I'm not mistaken). If
    I use default credentials, everything is working just fine. If not, I receive an error 401 unauthorized. This is my code when I try to use very basic authentication using CredentialCache:
    var req = (HttpWebRequest)HttpWebRequest.Create("http://{serverurl}/_api/lists/");
    req.Method = WebRequestMethods.Http.Get;
    var ccache = new CredentialCache();
    ccache.Add(new Uri("http://{serverurl}/"), "Basic", new NetworkCredential("{username}", "{password}", "{domain}"));
    req.Credentials = ccache;
    req.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f");
    var response = (HttpWebResponse)req.GetResponse();
    I've only replaced some irrelevant data with some placeholders. Thanks for your help and any clearification
    Regards Andreas MCPD SharePoint 2010. Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.

    Hey Amr,
    thanks for your feedback. Let me write down some more facts about my environment so we might be able to track down what's going wrong:
    - Virtual PC using Windows Server 2012
    - SharePoint 2013 with September CU
    - Compatibility Level 15 Webapplication using Default "Claims Based Authentication" with form based authentication activated
    - Visual Studio 2013 Console Application .NET 4.5 x64 Build Target
    Writing down what my base configuration is seems to have brought light into the dark. As soon as I deactivated FBA authentication I was able to execute the request without any problems. So now I know what I have to look for. Thank you!
    Regards Andreas MCPD SharePoint 2010. Please remember to mark your question as "answered"/"Vote helpful" if this solves/helps your problem.

  • HTTP error: 401 Unauthorized while uploading photo in hr master data

    Hi All,
    Transaction code OAAD while uploading a photo  iam faceing a problem
    i am getting error massage *HTTP error: 401 Unauthorized"
    i have done modifications in the transaction codes
    OANR ,OAC2,TABLE: V_T5850,OAC0,OAOH,OAAD,
    IN OAAD Transaction code i am getting this error
    HTTP error: 401 Unauthorized
    please guide me on this issue

    Hi Sai,
    First create a communication type user (via SU01) with SAP_ALL profile.
    Then goto SICF transaction.
    While hierarchy type is SERVICe hit "Execute" button.
    Find contentserver under default_host -> sap -> bc.
    Double click the service.
    Press Logon tab.
    Enter the relevant user info.
    Save - Back button.
    Activate the service (if it is not already active)
    Regards,
    Dilek

  • The remote server returned an error: (401) Unauthorized. IIS problem? (Beginner)

    (Beginner) Creating a Provider-hosted calendar list programmatically.
    I have done this:
    Uri hostWeb = new Uri(Request.QueryString["SPHostUrl"]);
    using (var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(hostWeb, Request.LogonUserIdentity))
    Web web = clientContext.Web;
    ListCreationInformation listCreator = new ListCreationInformation();
    listCreator.Title = "CompanyCalendar";
    listCreator.Description = "Workcalendar";
    listCreator.TemplateType = (int)ListTemplateType.GanttTasks; //106 = events 120=CustomGrid 140=WorkflowHistory 150=GanttTasks
    web.Lists.Add(listCreator);
    clientContext.ExecuteQuery();
    If I remove the code above there are no problems, as the title says there is something wrong with my permission to modify but I have set the wevb permission to "Full control" so it should be something else.
    Some people thinks that it has to do with IIS so I tried to set the servers authorization rules to allow all users but that didnt do it (maybe I didn't do it right).
    Im a beginner so please explain as you would for a absolute beginner that dont know IIS.How can I solv this problem, why doesent I get permission to create a list on my sharepointsite?
    thanks

    Hi,
    Check if the below article helps you
    http://sharepoint.stackexchange.com/questions/76624/the-remote-server-returned-an-error-401-unauthorized-provider-hosted-app
    http://jamestsai.net/Blog/post/SharePoint-Provider-Hosted-App-401-Unauthorized-error-on-clientContextExecuteQuery().aspx
    http://blog.dbandbi.com/tag/sharepoint-provider-hosted-app-the-remote-server-returned-an-error-401-unauthorized/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Getting error as 'Error 401 - unauthorized'

    Hi ,
    I have a af:goImageLink on a .jsff on clicking on which I am supposed to open a screen with print window . Code in .jsff is
    <af:goImageLink text="Print Current Data" targetFrame="_blank"
    icon="/theme/img/print.png"
    partialTriggers="Search"
    disabled="#{viewScope.Bean.printFlag}"
    destination="#{Bean.strPrintPath}"
    id="gil2" styleClass="print_margin_div"/>
    destination sting is the url of the .jspx to be opened for print.
    It is working fine.
    No on the .jspx I need to do data control binding. After doing that when i click on hypelink to open the print screen i am getting erro as 'Error 401 - unauthorized'
    Using Jdev 11.1.1.5.0
    start code in jspx is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <af:messages id="m1"/>
    <af:outputText value="#{bindings.emptyText.inputValue}" id="ot1"/>

    Hi,
    Have you configured ADF security ? If yes give access to this peg def file as well.
    Thanks
    Prateek

  • SAP XI error: 401 Unauthorized (When calling from Enterprise Portal)

    Hello Friends
    I am trying to access an SAP table from IVIEW of portal via XI. Using the latest and greatest version of all SAP Components. (We just installed couple of weeks back).
    I keep getting the following error message when I try to access data from IVIEW of portal.  
    "SAP XI error: 401 Unauthorized"
    What may be the reason? If some one can help me, I would really appreciate it.
    Thanks
    Ram

    Thanks Srinivas for your help.
    I tried accessing the URL directly and got the error message
    "User Credentials not passed via Enterprise Portal. Please contact your Administrator"
    Any more suggestions?
    Thanks again
    Ram

Maybe you are looking for

  • IPhoto library upgrade failed, one third of the photos lost, but the library works as normal. No corruption.

    Hello! I recently replaced my tragically crashed Macbook Pro 2008 with a newer model and transferred my volumous iphoto library of 20 000+ photos to my new machine. To be able to use my iphoto '08 library with Aperture I had to upgrade the library in

  • How do I Get iTunes to Show How Many Albums/Songs In My Library?

    This took me a long time, I have very good sound at a low price, an important issue for me. I needed small speakers for my tiny space. I like to crank up my music and dance around my bedroom occasionally. I tried several different sets, over the last

  • Problem with opening Final Cut Pro X

    I had just moved the 'Final Cut Pro' folder with the events and projects from movies into my own folder. I also had just added another desktop (Dunno if that is part of the problem). Since then, when I open FCP, it has a message saying 'The selected

  • IPad locks up since installing OS7.0.3

    I see discussion on all the safari issues with the new software, but my ipad locks up even when using the email function.  For instance I clicked on an email address sent to me in an email and the device locks up.  Is there a way to restore the old O

  • Ni elvis oscilloscope vi in labview

    Hello, I'm using NI ELVIS and Labview to drive a remote labratory over the internet. For this reason, I'm using the ELVIS source VI's running in labview, and not the elvis panel. When using the VI source code for the oscilloscope, the time division f