Provider Hosted Site not able to query SP site for information

Hi everyone,
This is the scenario. We have an application server (http://serv-wfm-app:102) not a part of the SharePoint farm that is hosting the website. It is a non-SharePoint server that communicates to a SharePoint site (http://onboarding and queries group membership
to see if the user is a part of that particular group. If the user is a part of the SharePoint group called "Admin" for instance it will show particular tabs. If they are not it will hide them. The code uses Client Object Model to query the group
membership information. The thing about this is that it works if I run a localhost debug session in Visual Studio. It detects the user and queries the SP site group membership successfully and hides the tabs based on if they a part of that group or not. However,
when run hosted on the http://serv-wfm-app:102 application server it will not hide the tabs and will not present with any error as well. Any ideas what the reason is for this? Here is a snippet of the code we are using.
using (var context = new ClientContext(_hostWebUrl))
GroupCollection siteGroups = context.Web.SiteGroups;
User user = context.Web.CurrentUser;
GroupCollection userGroups = user.Groups;
Group adminGrp = siteGroups.GetByName("Admin");
context.Load(adminGrp);
context.Load(user);
context.Load(siteGroups);
context.Load(userGroups);
context.ExecuteQuery();
foreach (Group group in userGroups)
//Checking the group
if (group.Title.Contains(groupName))
return true;

Hi,
Per my understanding, you might want to query information of a SharePoint site from an external server using Client Object Model.
As a common practice, I suggest you debug your code to see if all the objects in use hold proper value during the request.
Also, as the code will run on an external server, you will need to set the credential before requesting SharePoint resource:
https://msdn.microsoft.com/en-us/library/system.net.networkcredential.aspx?f=255&MSPPError=-2147217396
http://sharepointdragons.com/2012/04/20/authentication-when-using-the-sharepoint-client-object-model/
Thanks
Patrick Liang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • NOt able to get text value for 0calmonth in the query

    hi,
    I am not able to get the test for the calmonth in the selection screen of the Query.
    i.e If the user enter the value 01/2010 as input in the selection screen. I am not able to get its text Janurary 2010 displayed in the selection screen of the query.
    please let me know what could be the reason for this.
    regards,
    Mahesh

    Hi Mahesh,
    I regret to inform you there is no option to display the month text.
    The system works as designed. The "Key and text" option for the      
    infoObject is for display the technical name and the description.                                                                               
    I found a customer on SDN which the same doubt and the answer for your
    question. Please, check the link below:                                                                               
    0calday text variable        
    Best Regards,
    Des

  • Users are not able to query request submitted by other user .

    users are not able to query request submitted by some other user using the same responsibility .
    applications ver . 12.1.2

    I have just upgraded 11.5.10 to 12.1.3. I have followed doc ID 804296.1 so users can see out files within the same responsibility. But users still cannot see out files from other users. I really believe I have followed the doc completely. Any advice?
    SQL> select bug_number from ad_bugs where bug_number like '8671003';
    BUG_NUMBER
    8671003
    Also these are the steps I took per the doc:
    sysadmin >Functional Developer >Security > Objects
    Search on Database Object = FND_CONCURRENT_REQUESTS
    Click on Concurrent Requests.
    Click on Object Instance Sets tab.
    Click on Create Instance Set button.
    Name=Allow user to view other requests within same responsibility
    Code=XXFND_CONC_REQUESTS_01
    Description=Allow user to view other requests within same responsibility
    Predicate=
    &TABLE_ALIAS.request_id in (select cr.request_id from fnd_concurrent_requests cr where
    cr.responsibility_id = fnd_global.resp_id and cr.responsibility_application_id =
    fnd_global.resp_appl_id)
    Sysadmin >User Management >Roles and Role Inheritance
    Click Create Role button
    Catagory=Miscellaneous
    Role Code=UMX|XX_VIEW_OUTPUT
    Display Name=View Output For Same Responsibility
    Description=View Output For Same Responsibility
    Click Create Grant and "Save and Continue'
    Name=XX_VIEW_OUT
    Description=View output of other users in same resposibility
    Object=Concurrent Requests
    Click Next
    Data Content Type “Instance Set”
    Instance Set=Allow user to view other requests within same responsibility
    Click Next
    At the bottom
    Set=Request Operations
    Click Next> Finish
    Edited by: 893303 on Oct 26, 2011 6:53 AM

  • Not able to generate multiple lines for headers in report

    Hi,
    I am new to BI publisher and not able to generate multiple lines for headers. Please help me to resolve.
    I am using RTF template, data source as PS Query and XML file (system generated from the data source)
    When I am using system generated 'First XML' file, I am getting output in the follwoing format.
    TEAM_MEMBER, PROJECT_ID, NAME, START_DT
    e.g.
    EMP1 , 71000, Sample, 01-Jan-2010
    EMP1 , 72000, Sample, 01-Feb-2010
    EMP1 , 73000, Sample, 01-March-2010
    But I want the report to be generate with multiple projects for one employee like below format , for that I used 'Second XML' file but I am getting blank report.
    In short if there is one to many case, how to show in reports??? Please correct if I am going wrong.
    TEAM_MEMBER
    PROJECT_ID, NAME, START_DT
    PROJECT_ID, NAME, START_DT
    PROJECT_ID, NAME, START_DT
    e.g.
    EMP1
    71000, Sample, 01-Jan-2010
    72000, Sample, 01-Feb-2010
    73000, Sample, 01-March-2010
    **********First XML**************System generated XML ****************************
    <?xml version="1.0"?>
    <query numrows="2" queryname="SY_EMP_PROJECT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
    <row rownumber="1">
    <TEAM_MEMBER>TEAM_MEMBER </TEAM_MEMBER>
    <PROJECT_ID>PROJECT_ID samp</PROJECT_ID>
    <NAME>NAME sample data</NAME>
    <START_DT>2010-08-25</START_DT>
    </row>
    <row rownumber="2">
    <TEAM_MEMBER>TEAM_MEMBER</TEAM_MEMBER>
    <PROJECT_ID>PROJECT_ID samp</PROJECT_ID>
    <NAME>NAME sample data</NAME>
    <START_DT>2010-08-25</START_DT>
    </row>
    </query>
    **********Second XML**************Manually created XML and using to show multiple projects for one employee****************
    <?xml version="1.0"?>
    <TEST numrows="2" queryname="SY_EMP_PROJECT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
    <TEAM_MEMBER rownumber="1">
    <TEAM_MEMBER>1</TEAM_MEMBER>
    <EMPLOYEE_NAME>SAMPLE</EMPLOYEE_NAME>
    <PROJECT>
    <PROJECT_ID>1111</PROJECT_ID>
         <PROJECT_DESCR>SAMPLE</PROJECT_DESCR>
    <START_DATE>01012010</START_DATE>
    </PROJECT>
    <PROJECT>
    <PROJECT_ID>1112</PROJECT_ID>
         <PROJECT_DESCR>SAMPLE</PROJECT_DESCR>
    <START_DATE>01022010</START_DATE>
    </PROJECT>
    </TEAM_MEMBER>
    <TEAM_MEMBER rownumber="2">
    <TEAM_MEMBER>2</TEAM_MEMBER>
    <EMPLOYEE_NAME>SAMPLEC</EMPLOYEE_NAME>
    <PROJECT>
    <PROJECT_ID>1111</PROJECT_ID>
         <PROJECT_DESCR>SAMPLE</PROJECT_DESCR>
    <START_DATE>01012010</START_DATE>
    </PROJECT>
    <PROJECT>
    <PROJECT_ID>1112</PROJECT_ID>
         <PROJECT_DESCR>SAMPLE</PROJECT_DESCR>
    <START_DATE>01022010</START_DATE>
    </PROJECT>
    </TEAM_MEMBER>
    </TEST>
    Edited by: ganeshtw on Aug 25, 2010 12:14 AM

    Hi,
    With your first xml you can print like
    EMP1
    71000, Sample, 01-Jan-2010
    72000, Sample, 01-Feb-2010
    73000, Sample, 01-March-2010While creating the RTF template you can use the Group by option.
    <?for-each-group:ROW;./columnname> then print the column name
    <?columnname?>
    --Then your table format
    71000, Sample, 01-Jan-2010
    72000, Sample, 01-Feb-2010
    73000, Sample, 01-March-2010
    <?end for-each-group?>
    Thanks.

  • Not able to find driver page for HP 15-r007tx

    Not able to find driver page for HP 15-r007tx.
    The web site is able to detect my product, but when clicked on link Software & Driver Downloads, it says page not found.
    Please help. I am looking drivers for windows 7 ultimate.

    Hi Anoop22Sharma
    Install:
    Intel Chipset Installation
    Intel Video Driver 
    NVIDIA High-Definition (HD) Graphics Driver
    Synaptics Mouse Driver
    Realtek Ethernet Controller Drivers  
    MediaTek(Ralink)802.11 b/g/n Wireless LAN (WLAN) Adapter
    Ralink Bluetooth Software Driver
    Intel USB 3.0 Driver for Intel 8 and U/Y Series
    Realtek High-Definition (HD) Audio Driver
    Realtek PCIe Media Card Reader Driver
    HP 3D DriveGuard

  • Sales Order form error  "Not able to retrieve Display values for Service"

    Hi,
    Few of our orders flash the below error message when the order is queried
    "Not able to retrieve Display values for Service"
    Below are the points I observed
    1.The orders I am referring to are imported order via EDI interface.
    2.The service reference type code has value of ORDER, however no other service related fields (like service reference line id) have any values.
    3. The item is not a service item (service tab in Item setup is disabled)
    4. Same item when imported with value of "Customer Ordered" in "service reference type code" field, does not throw an error.
    5. If I update "service reference type code" with value null or change it to CUSTOMER_PRODUCT, the error disappears.
    Can someone explain the significance of this column value and what could have been causing this error message?
    May be there are some dependent fields/setups which must have a value when service reference type code =ORDER.
    Thanks in advance,
    JC
    Edited by: user10174990 on Oct 25, 2012 10:58 AM

    Hi,
    Maintain the dafault values using Tcode OISF with respective to Planning Plant you have to maintain the following values like Order Type, Main Work Center, Maint. Plant,Group,Group Counter,Business Area & Task List type.
    or
    Apply these OSS note 150732 / 195993.
    regards,
    Venkatesan Anandan

  • Not able to add outgoing payment for vendor

    Hi to all Experts,
    I am facing problem i.e I am not able to add outgoing payment for Vendor. I have tried to multipul time using different users also. I have booked purchase first and then tried to make payment to the vendor.Docdate is 14th Jul 08, and docdue date is 18th Aug. 08.
    I have made two entries for outgoing payment using G/L A/c. option before trying to do this entry successfully.
    Can any body plz help me to resolve this issue.
    Warm Regards,
    Chintesh Soni

    Hello Chintesh,
    The scenario seems to be similar to the one described in Note 1027043.
    Here is the text from the Note:
    "You are trying to add the an Outgoing Payment for an A/P Invoice or A/P Credit Memo using Checks as Payment Means. However, after pressing the 'Add' button, the payment is not added and the system does not send an error message."
    This issue occurs when the Vendor Ref. No. field in the A/P invoice or the A/P credit memo has more than 39 characters.
    It is an application error that is fixed in PL26, 2005B (Note 1073858). Kindly upgrade to the latest patch. If not possible at the moment, you can use the workaround provided in the Note.
    I hope this helps.
    Regards,
    Lorna Real

  • ASCP Plan Is Not Able To Read Global Forecast For Options Published By Demantra

    ASCP plan is not able to read global forecast for options published by Demantra
    ASCP plan is not able to read global forecast for options published by Demantra. Only Model Forecast is being read into ASCP plan. 
    1) We are publishing global forecast from Demantra at CTO/Zone/Week level and it is getting published properly to ASCP denorm table. 
    2)There is no forecast explosion being done in ascp (plan option explode forecast is not checked) 
    3)The sourcing rule is set at zone level for the model saying source from an organization (org code 11) 
    4) The profile: msc:-Organization containing generic BOM for global forecasting is set to 22 which is a reference org 
    5) Now when we run the plan the model forecast goes to org 11  but the option forecasts do not go properly 
    6) We have just one line created for the option (production forecast) with a wrong quantity
    7) Demantra has forecasts for both Model and options

    Looking at the error message "The Network Adapter could not establish the connection" , It appears hostname and port may be incorrect. Review the targets.xml under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\emd and
    emoms.properties under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\config folder to make sure host ( sap_solman) and port (1527) are correct.
    As far as setting the environment variables goes, you can go to control panel -> system -> advanced -> environment variables and set the ORACLE_HOME and ORACLE_SID
    -Ramesh

  • Host site for localhost only

    Is it possible to host sites for my computer only with the server app?  Like have the sites I wanna host use ww1 instead of www?  Ex:  ww1.example.com

    While your computer might well be a DNS server, that query clearly got to the Level 3 DNS servers — which isn't something that would be expected, if your computer is the authortative DNS server — which implies there's an error in the local DNS, or there are errant references out to the Level 3 DNS servers. 
    Reload the DNS, and make sure you haven't forgotten the trailing dot at the end of the host name if you're trying to specify the FQDN.  (Omit that pesky dot and the DNS server will add the domain onto the string, and you'll end up with mumble.example.com.example.com.)  
    Here's a write-up on setting up DNS.

  • In 4.1 BO Client Tools not able to find data source  for BVM

    Hi All,
    In 4.1 BO Client Tools not able to find data source  for BVM
    Its creating issue .
    So if any body have any solution please let me know.
    Regards,
    Abhishek

    java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
         at customertree.XmlLoader.readData(XmlLoader.java:127)
         at customertree.XmlLoader.<init>(XmlLoader.java:69)
         at customertree.CustomerTreeFinal.jbInit(CustomerTreeFinal.java:240)
         at customertree.CustomerTreeFinal.init(CustomerTreeFinal.java:858)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source
         at java.lang.Thread.run(Unknown Source)and then inside the code... this is where i get my first error
    clients.setRowId(list2.item(i).getTextContent());

  • Latest Lithroom 5.6 does not recognize my .cr2 raw file format and Windows 7 it asociates with my older raw plug in in Ps CS5.5. I am not able to change default program for .cr2 in the properties pannel...

    Latest Lithroom 5.6 does not recognize my .cr2 raw file format and Windows 7 it asociates with my older raw plug in in Ps CS5.5. I am not able to change default program for .cr2 in the properties pannel...
    every new released update of Lr from v 5.2 changed somethin in my Windows 7 Professional settings. I am stucked. Can somebody help me please? Many thanks. Andrej

    Hi Jim,
    yes after I imported my .cr2 raw files into new catalog it started to work. Windows 7 still does not recognize them but I can edit them as you said within the Lr5.6 and then export them into .psd or .dng files...as needed.
    I bought Lr5 only because I got present - my new camera Cannon 70D and because my older Photoshop CS5.5 raw plugin does not recognize. cr2 files.
    Many thanks for your help.
    Andrej.

  • I am not able to open your answer for some reason my computer is not opening it in Explorer, it's not responding and I keep getting error messages and I don't know how to open it in another browser when Explorer experiencing issues. Heather

    I am not able to open your answer for some reason my computer is not opening it in Explorer, it’s not responding and I keep getting error messages and I don’t know how to open it in another browser when Explorer experiencing issues.
    Heather

    If you  have IE version 10 go to TOOLS and change the option to use Compatibility View

  • HT201263 I am not able to restore neither from iTunes nor from iCloud. The proble with iTunes is it says that the backup is corrupted or incompatible. And I am not able to connect to iCloud for restoring. I have IOS 7.0.4 when I have taken the backup.

    I am not able to restore neither from iTunes nor from iCloud. The proble with iTunes is it says that the backup is corrupted or incompatible. And I am not able to connect to iCloud for restoring. I have IOS 7.0.4 when I have taken the backup.
    iCloud does not connect and it says Request Timed out.
    Not Sure how to restore my iPad.
    Please help!!
    Thanks

    my problem is with I cloud not iTunes what's up with apple haven't they got the brains to sort out this prob, that they have to let the "community " know instead of helping to fix the problem without having to go through all the hassle of signing in writing a small blog & then leaving it until someone bored with time to write their blog to at some point fix the prob or not ! oh nearly forgot my prob like
    HRESULT:0X80070570 no clear explanation as to what this means or why in plain English for the not techno phoebes

  • When i start my itunes, it start immediately but than i am not able to click on anything for at-least 20 minutes.

    When i start my itunes, it start immediately but than i am not able to click on anything for at-least 20 minutes.
    I have a lot of songs on there from my local drive and also a network drive which is connected to my local hhome network.
    Now before when i use to load itunes while it get frozen it used to collect information on 3 songs and i knew their names so went ahead and deleted them but now i dont see it collecting any information and just frozen.
    I just got an iphone and also noticed that once i am syncing my iphone and than i cancel the sync it will again freeze.
    What could be causing this, please tell me a way where i dont have to erase my library and re scan it.
    One important note - My iTunes Media folder location is on my Network Drive. Can that be the reason?
    Let me know.
    Thanks in Advance,
    Jay

    The "tap to click" function isn't enabled until a user logs on.  You should be able to use the "physical click" (push down on the front left of the trackpad) in the login screen.
    Regards,
    Captfred

  • HT6147 With the latest iOS 7 update (Feb 2014) is anyone else experiencing trouble with the App Store not able even to load updates for existing apps, and unable to download new apps?

    With the latest iOS 7 update (Feb 2014) is anyone else experiencing trouble with the App Store not able even to load updates for existing apps, and unable to download new apps?

    With the latest iOS 7 update (Feb 2014) is anyone else experiencing trouble with the App Store not able even to load updates for existing apps, and unable to download new apps?

  • I have a mac OS X 10.4.11 and have created a website in iweb08  ... in order to get it to my host site for it to go live I am having difficulty finding a ftp client to get me there. Can anyone suggest what I should do?

    I have a mac OS X 10.4.11 and have created a website in iweb08  ... in order to get it to my host site for it to go live I am having difficulty finding a ftp client to get me there. Can anyone suggest what I should do?

    Check if any of the below have an older version by contacting the author for your 10.4.11:
    http://www.rbrowser.com/
    http://rsug.itd.umich.edu/software/fugu
    http://cyberduck.io/
    http://panic.com/transmit/
    http://fetchsoftworks.com/
    Or use Applications -> Utilities -> Terminal to do command line FTP:
    http://www.dummies.com/how-to/content/how-to-use-ftp-from-terminal-to-transfer-m ac-files.navId-400509.html
    Upgrading to 10.6.8 should still give you mostly the same compatibility as 10.4.11. Upgrading to 10.7 and above won't.

Maybe you are looking for