Access to office 365 api

Hi team, 
i have been building up native applications and has access to Microsoft tenant in azure and there i have already the mobile application. Also i can add the webapi's to my application once when i went to configure tab and hit add on the bottom.
So from here i can add office 365 exchange online api and set the delegated permissions to required field.
Also i went through couple of articles and videos which shows how to get access to office 365 api.
http://www.microsoftvirtualacademy.com/training-courses/deep-dive-integrate-office-365-apis-in-your-mobile-device-apps?m=11496
As mentioned in video we add the connected service and it sign in to microsoft account and register the app.
Also add some client id to App.xaml . And when we went to tenant application page we can see the new registered app with a client id.
Please let me know if i already has the application in azure and i have added the office 365 exchange online api , then shall i need to do above steps or i can directly hit the api service Uri's.
thanks,
NItesh

Hi,
need to add the office 365 exchange online web api in Azure and set the required permissions.
then following this video code we can connect with office apis
http://www.microsoftvirtualacademy.com/training-courses/deep-dive-integrate-office-365-apis-in-your-mobile-device-apps?m=11496
also following url can be referred if we need directly to communicate with office 365 api using Oauth authentication method.
https://msdn.microsoft.com/en-us/office/office365/api/api-catalog
Thanks,
Nitesh

Similar Messages

  • How to Use Office 365 api in Provider Hosted App

    Hi,
    I want to use outlook api in SharePoint Provider Hosted App.
    when I use :-
     $.ajax({
                url: 'https://outlook.office365.com/api/v1.0/me/contacts',
                type: 'GET',
                beforeSend: function (xhr) {
                    xhr.setRequestHeader('Authorization', 'Bearer');
                Accept: "application/json",
                "client-request-id": "9de3d763-a8d9-4433-92f3-096d6be36d86",
                success: function () {
                alert("Welcome to Outlook ")},
                error: function (e) {
                    alert(' Error121212 :' +e);
    Error:-
    XMLHttpRequest cannot load https://outlook.office365.com/api/v1.0/me/contacts. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:44309' is therefore not allowed access. The response had HTTP status code
    401.
    Please Provide me a good example.
    Thanks in Advance

    Hi SharePlus,
    You probably want to use the Office 365 API's to authenticate and communicate with the API's. 
    There's several resources available for this:
    Ultimate LinkRoll for Getting Started with the Office 365 API's
    Download Office 365 API Tools for Visual Studio 2013
    Getting Started with O365 Dev - Communicate with Exchange
    If you don't want to use the pre-compiled typed objects in the Office 365 API's for communicating with the Mail service (Exchange), you can always just make sure to handle the authentication properly and then construct your queries as raw queries, like Chaks
    describes here: http://chakkaradeep.com/index.php/working-with-office365apis-the-raw-version/
    Also, as a general rule; When working with anything Office 365, you should always keep an eye out for the example code, articles and news published from the Office 365 Patterns & Practices team here: https://github.com/OfficeDev/PnP
    I hope this will guide you in the right direction :-)
    Tobias Zimmergren
    Microsoft MCP, MCTS, MCT, MVP (SharePoint)
    Blog: www.zimmergren.net
    Twitter: twitter.com/zimmergren
    Corporate site: www.tozit.com

  • Office 365 API, error: The token has invalid value 'roles' for the claim type ''

    Hi guys,
    I am trying to develop a Daemon / Server application using the new Office 365 APIs. I have added a new application to Azure Active Directory. I am using cURL + the app ID and secret to get a JWT token, this is the exact request:
    curl -X POST https://login.windows.net/TENANT_KEY/oauth2/token \
    -F redirect_uri=http://spreadyDaemon \
    -F grant_type=client_credentials \
    -F resource=https://outlook.office365.com/ \
    -F client_id=XXXX \
    -F client_secret=XXXX=
     I get back a JWT however it has no scopes for access set here is the decoded JWT claims:
    "ver": "1.0",
    "aud": "https://outlook.office365.com/",
    "iss": "https://sts.windows.net/TENANT_KEY/",
    "oid": "17fa33ae-a0e9-4292-96ea-24ce8f11df21",
    "idp": "https://sts.windows.net/TENANT_KEY/",
    "appidacr": "1",
    "exp": 1415986833,
    "appid": "XXXX",
    "tid": "e625eb3f-ef77-4c02-8010-c591d78b6c5f",
    "iat": 1415982933,
    "nbf": 1415982933,
    "sub": "17fa33ae-a0e9-4292-96ea-24ce8f11df21"
    Therefore when I do a request to the exchange API endpoint I get the following response:
    HTTP/1.1 401 Unauthorized
    Cache-Control: private
    Server: Microsoft-IIS/8.0
    request-id: d08d01a8-7213-4a13-a598-08362b4dfa70
    Set-Cookie: ClientId=WDALDNO0CAIOOZDZWTA; expires=Sat, 14-Nov-2015 16:40:59 GMT; path=/; HttpOnly
    X-CalculatedBETarget: am3pr01mb0662.eurprd01.prod.exchangelabs.com
    x-ms-diagnostics: 2000001;reason="The token has invalid value 'roles' for the claim type ''.";error_category="invalid_token"
    X-DiagInfo: AM3PR01MB0662
    X-BEServer: AM3PR01MB0662
    X-AspNet-Version: 4.0.30319
    Set-Cookie: exchangecookie=6bf68da033684824af21af3b0cdea6e3; expires=Sat, 14-Nov-2015 16:40:59 GMT; path=/; HttpOnly
    Set-Cookie: [email protected]=[email protected]4Wbno2ajNGQkZKWnI2QjJCZi9GckJKBzc/Oy9LOzdLOy6vOycXLz8XKxoGaio2PjZvPztGPjZCb0ZqHnJeekZiak56djNGckJI=; expires=Sun, 14-Dec-2014 16:40:59 GMT; path=/EWS; secure; HttpOnly
    Set-Cookie: [email protected]=[email protected]4Wbno2ajNGQkZKWnI2QjJCZi9GckJKBzc/Oy9LOzdLOy6vOycXLz8XKxg==; expires=Sun, 14-Dec-2014 16:40:59 GMT; path=/EWS; secure; HttpOnly
    X-Powered-By: ASP.NET
    X-FEServer: DB4PR02CA0026
    WWW-Authenticate: Bearer client_id="00000002-0000-0ff1-ce00-000000000000", trusted_issuers="00000001-0000-0000-c000-000000000000@*", authorization_uri="https://login.windows.net/common/oauth2/authorize", error="invalid_token",Basic Realm="",Basic Realm=""
    Date: Fri, 14 Nov 2014 16:40:59 GMT
    Content-Length: 0
    I have asked a stack overflow question here: http://stackoverflow.com/questions/26950838/office-365-api-error-the-token-has-invalid-value-roles-for-the-claim-type
    Any help on the matter will be hugely appreciated, thanks!

    Hi Manu,
    To wrap this thread up; I have had an answer on stack overflow.
    It appears that currently the grant type client_credentials is not supported, according to a comment on this blog post by Matthias' http://blogs.msdn.com/b/exchangedev/archive/2014/03/25/using-oauth2-to-access-calendar-contact-and-mail-api-in-exchange-online-in-office-365.aspx 
    "There is no way in the code flow to avoid username/password. We're working on a client credential flow for later this fall that will give you the functionality required to run background services. For this you will not need a username/password,
    but the application will directly assert its identity and authenticate as itself."
    Unfortunately I require client_credentials for a daemon process, Q4 is the scheduled release for support for this grant time.
    Thanks for the help,
    Nick

  • Javascript Support in Office 365 APIs

    Looking at the Office 365 API Preview, I came across this sentence in the Discovery Service section.
    "Currently, the Discovery Service APIs are available in a .NET C# managed portable library that can be used by Native, Windows Store, and Windows Phone apps."
    If the Office 365 APIs will only be available when fully released as C# libraries that is a huge problem, especially if you want Windows Store App Developers to write apps that utilize data from it, even OData. There is a very large section of that dev community
    that write in JavaScript and you will essentially be ignoring and/or cutting off that whole segment of that community if you do. One of the great things about the Windows 8 App dev platform is that a developer can use (almost) any language that he/she is comfortable
    with, that HTML/Javascript and C#/XAML live, breath and thrive together. Unfortunately, it seems that the SharePoint product teams only are able to write in C#.
    It has been quite a struggle to write apps that utilize the SharePoint 2013 product line (on-prem, online, Project Online, etc) as a HTML/Javsacript Windows Store App developer, especially around authentication. No samples exist. The C# samples that do exist
    utilize coding methods that are very specific to how one would developer on the SharePoint platform before the new "app" dev model came about, which aren't necessarily the correct or appropriate ways that a Windows 8 developer would/should do things.
    It's like they didn't even bother to learn about the axioms and dev principals for Windows 8 Store Apps or worse didn't talk to their colleagues on the Windows Dev team.
    I write in both HTML/JavaScript and C#/XAML, which is not a common practice. However, when I am writing Windows 8 Store apps, HTML/JavaScript is the language that I prefer. It is just easier to get some of the more advance design things done in that language
    combination then in C#/XAML I have found. I have been holding off releasing some of my apps because I want to support O365/SharePoint Online/Project Online with them. If these new libraries are only going to be C#, then my apps just won't support O365. I would
    hope though that going forward that more support would be given to this large section of your customer community.
    Regards,
    Christine Flora

    Not sure if you've done a lot of work trying to get OData out of Office 365 / SharePoint Online or Project Online or done any Windows 8 development, but you must authenticate before you can even get TO the OData endpoints. So yes, the REST Endpoints are
    accessible by using an httpClient call from within Javascript, if in fact you can authenticate and authorize first.
    Currently this is a big pain in the backside, even if using C#, but from JavaScript it is almost impossible. Even now some of the current/popular methods for doing so can open big security holes on a Win8 machine (ie: running a claims service on your Win8
    machine locally just to authenticate to name just one).  I was hoping / am hoping that the new APIs will help with that, but I am not at all encouraged by what I am seeing and hearing so far especially since it looks like from the quote I provided above
    that they will only be available if you are using C#. As I pointed out, a large part of the Win8 App Dev community using JavaScript.
    I want to put it out there that I truly hope that the SharePoint product teams take this into consideration as they work on these new APIs and other ways to extend the SharePoint App family.
    Christine

  • Office 365 API: work hours and private appointments

    Hi,
    We have application that supports Exchange on-premis and we wont to add Office 365 support. For that we need to be able to obtain same information that we use currently with our on-premis solution.
    Does Office 365 API support retrieving information about user work hours and events that are marked as private? I haven't found this in documentation https://msdn.microsoft.com/en-us/office/office365/api/api-catalog
    Best regards
    Krzysztof Branicki

    Hi Krzysztof,
    Thanks for posting here!
    This forum is for Azure Active Directory and your query is about Office365.
    Microsoft has dedicated forums for Office 365 commercial support. To ensure you
    connect with the right experts
    please post your question to
    http://community.office365.com/en-us/f/default.aspx. Also, if you use your Organizational email address for your first-time log-on you will have a more personalized experience.   
    I am archiving this thread from my end as there is no action required from Azure AD Forum (MSDN Forum).
    Best Regards,
    Sadiqh

  • Office 365 API

    Can we integrate Office 365 API's directly in Visual Studio 2012 ? Also if we integrate is it possible to customize the  Mailboxes, Calendar etc.. and also can apply our own styles ?
    Thanks

    Usually when people say API they are talking about server side code, which is not allowed in Office 365.  So in that sense no you can't use the Office 365 APIs.  You can use the new client side object model from Visual Sudio 2012.  Take a
    look at the following site for an Introduction to Development for Office 365 and SharePoint 2013.
    http://www.microsoft.com/en-us/download/details.aspx?id=17069
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Office 365 API with Visual studio 2013 using file REST API

    Hi,
    I had configured MVC application for getting files from office 365 one drive, I am able to seen all file on last day but Now I am getting below issue 
    <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, System.ApplicationException</m:code><m:message xml:lang="en-US">Error
    in the application.</m:message></m:error>
    when I want to see again all files. and most important I didn't make any changes in my previous code...
    Please share your suggestion....

    Hi,
    If you are developing an app for SharePoint, the app can call into a user’s MySite site collection and access their OneDrive for Business documents using REST or CSOM.
    The REST call to get to the file would be:
    https://YourO365DomainHere-my.sharepoint.com/personal/YourUserName_YourO365DomainHere_onmicrosoft_com/_api/web/GetFileByServerRelativeUrl('/personal/YourUserName_YourO365DomainHere_onmicrosoft_com/Documents/Shared%20with%20Everyone/myDocument.docx')/$value
    More information is here:
    http://blogs.msdn.com/b/sharepointdev/archive/2013/08/13/access-skydrive-pro-using-the-sharepoint-2013-apis.aspx
    Best regards
    Dennis Guo
    TechNet Community Support

  • GetByPathAsync() method in Office 365 API

    I'm currently working on a Universal app that uses the Office 365 client libraries and would like to access the documents library in my teamsite.  I tried to use the
    GetByPathAsync() method while passing a string that contains the document library name but that didn't work, I also tried providing the whole path but that didn't do any good either. Could anyone please guide me to a way where I could access
    the teamsite? I have looked all over the Office dev hub and couldn't find a single sample on the method above.
    Thanks

    Hi,
    What was the parameter you passed to the GetByPathAsync method?
    Here is a path sample for your reference: “/Documents/FolderName”.
    And you may find more samples about how to use getByPath API from the document below.
    https://msdn.microsoft.com/en-us/office/office365/api/files-rest-operations
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • OneDrive for Business for iOS Devices - Accessing Non Office 365 Hosted Sites

    Hello,
    I have a SharePoint site that I host on premise and am not using Office 365 at all.  Is it possible for me to access the site using the iOS version of the OneDrive for Business app?  When I specify my username, password and SharePoint 2013 site
    URL i get a login error with username/password incorrect.
    Does the iOS app only support Office 365 implementations of SharePoint?
    Thanks

    what type of authentication you are using, this is the key?
    check this official blog:
    http://blogs.office.com/2014/02/27/introducing-onedrive-for-business-for-ios-v1-2/
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3ad5b8ca-37e9-43b2-9201-9c5c339d157c/onedrive-for-business-ipad-app-with-onpremise-sharepoint-2013?forum=sharepointadmin
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Access denied office 365 / SharePoint online with Global Admin account

    Hi All,
    I am going crazy since two days solving an issue. The problem is;
    I am making a console APP which is talking to SharePoint Online using global admin account (One which was specified as admin while making a new subscription). What I am trying to achieve is, I want to add a custom action using CSOM to each site collection and
    subsite of office 365. That code works fine except on the root site collection which is pre-created by office 365 while signing up (i.e. https://xyz.sharepoint.com)
    Whatever I do on that site collection, it says gives me below error;
    "SchemaVersion":"15.0.0.0","LibraryVersion":"16.0.3912.1201","ErrorInfo":{
    "ErrorMessage":"Access denied. You do not have permission to perform this action or access this resource.","ErrorValue":null,"TraceCorrelationId":"2a47fd9c-c07b-1000-cfb7-cdffbe3ab83a","ErrorCode":-2147024891,"ErrorTypeName":"System.UnauthorizedAccessException"
    },"TraceCorrelationId":"2a47fd9c-c07b-1000-cfb7-cdffbe3ab83a"
    Now the user is global admin. I also added again that user as site collection admin. 
    The same piece of code works fine on other site collections (search site collection, any newly made site collection...). 
    here is a code;
                using (ClientContext spcollContext = new ClientContext(web.Url))
                    SecureString passWord = new SecureString();
                    foreach (char c in strAdminPassword.ToCharArray()) passWord.AppendChar(c);
                    SharePointOnlineCredentials creds = new SharePointOnlineCredentials(strAdminUser, passWord);
                    spcollContext.Credentials = creds;
                    Web currentweb = spcollContext.Web;
                    spcollContext.Load(currentweb);
                    spcollContext.ExecuteQuery();
               //     authCookie = creds.GetAuthenticationCookie(new Uri(web.Url));
                    var existingActions2 = currentweb.UserCustomActions;
                    spcollContext.Load(existingActions2);
                    spcollContext.ExecuteQuery();
                    var actions2 = existingActions2.ToArray();
                    foreach (var action in actions2)
                        if (action.Description == "CustomScriptCodeForEachsite" &&
                            action.Location == "ScriptLink")
                            action.DeleteObject();
                            spcollContext.ExecuteQuery();
                    var newAction2 = existingActions2.Add();
                    newAction2.Description = "CustomScriptCodeForEachsite";
                    newAction2.Location = "ScriptLink";
                    newAction2.ScriptBlock = scriptBlock;
                    newAction2.Update();
                    spcollContext.Load(currentweb, s => s.UserCustomActions);
                    spcollContext.ExecuteQuery(); // GETTING ERROR ON THIS LINE. 
    Note: Above error is Fiddler traces.
    Nitin Khubani Sharepoint Developer

    Hi Nitin Khubani,
    Thanks for posting in MSDN forum.
    This forum is for developers discussing developing issue about
    apps for Office. Since the issue is more relative to SharePoint developing, I would like to move it to
    SharePoint 2013 - Development and Programming forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Trying to access SharePoint / Office 365 Server options from the browser

    When I use the Open With Explorer view of a SharePoint library and open a document from there, I am prompted to Check Out & Open (or just open) the file.  And then from the open file, under the File menu, I have an option for SharePoint / Office 365 Server, to check the file back in and/or to update Document Properties.  This is the exact functionality I am looking for.  My question is, why don't I have this option when I open the PDF in one of these scenarios:
    direct from the browser (within SharePoint)
    from a synced library
    outside of SharePoint (i.e. from the Desktop)

    Seems like a good question for a SharePoint user forum.
    Be well...

  • [Exchange-Online][EWS][Android]Is it possible to reach Exchange room resource mailbox through Office 365 API for Java/Android

    Hi guys,
    Title covers largely what I'm trying to do. I'm trying to create an app in Android Studio that uses the Office365 for Android API (https://github.com/OfficeDev/O365-Android-Start).
    In this app i want to bind calander events to Locations that i create in Exchange online. Is this possible? If so, how? Have not been succesful in finding in any information on the issue so far.
    At the moment when the user wants to create an event, the user just types in the "location", but this is just a string and not bound to anything. I would prefer to get a dropdown of all the room resources I have on Exchange and that this will make
    that the location. This to prevent 2 seperate meetings happening in the same room at the same time.
    (Was sent here from the O365-forums, so sorry if this is a misplaced post)
    Thanks for any and all help.
    Mathias

    So then I'm guessing you want to be able to retrieve the list of resources in the address book? If the Exchange admins have configured room lists, you could use those:
    https://msdn.microsoft.com/EN-US/library/office/dn643730(v=exchg.150).aspx.

  • Office 365 Files REST API - Get direct children in the root of the default document library

    I'm trying to work with Office 365 Files REST API which works just fine except one thing that I'm struggling with.
    What I need for my application is to make an explorer like browse capability for OneDrive for business Document Library.
    My problem is that I don't know how to get the direct children in the root of the Document library
    The API request
    GET ../_api/files will
    retrieve all files and folders in the default document library, including files and folders from sub-directories.
    What I need is basically the functionality of the API request
    GET ../_api/files(<folder_path>)/Children
    that works also for the root folder of the Document library. The problem is that I couldn't find a way set <folder_path> as the root folder. 
    I found out that the API call ../_api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Folders and _api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Files works as expected resulting the only the direct
    children of the root folder if the folder_server_relative_path is the path of the document library. The problem with this API call is that it's requires server relative path of the (default) document library (which i don't have) and the result has a different
    schema compared to the ../_api/files REST API call.
    Can somebody help me with this problem?
    David

    First thanks for the fast answer. Let me explain my use case in more details.
    I'm trying to work with the new summer release of the
    Office 365 API tool for Visual Studio 2013 (update 3)
    I found no reasonable way to retrieve the direct children of the root folder from my One Drive for business Document Library using the newly added SharePointClient library.
    The API call of `SharePointClient.Files` will retrieve all the files and folders from the whole document library including sub-folders. So in order to get only the direct children I have to page through all the documents and folders and analyze their URL, which
    is not acceptable for my application scenario. For a sub-folder I can get the direct children like this: `SharePointClient.Files["<folder_id>"].ToFolder().Children` This is what I need but it can't be applied to the root folder.
    So what I did I've checked what REST API calls this library makes and I've tried to find out if there is a way to achieve my goal at least using direct REST API call. It seems like the functionality is missing from the REST API itself. 
    The http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/items API call also retrieves all the items hierarchy from the library (including items from sub-folders) and the result XML "schema" (fields and the meaning of the ID) differs from the one used
    by the calls by SharePointClient library. (for example the "Id" is a number when the /items is called but when
    /_api/files is called the "Id" is the relative path to the document library)
    Basically what I need can be achieved with the call to http://site url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/files and http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/folders but again the schema of the result differs from the one used in SharePointClient
    library. This means that in order to get  the direct children of the root I will need to re-implement a good part of the SharePointClient library. It seams like there is 2 kind of REST API is implemented. ( missing  "Id" and "url"
    fields, etc)
    Also there is no convenient way to get the Name or the GUID of the default document library which the SharePointClient.Files
    (https://site_url/_api/file) automatically
    uses. The DiscoveryContext.DiscoverCapability for "MyFiles" doesn't gives any hint either.
    David

  • Access to Portal/Portlet API

    Hi,
    Does anyone know/have experience with accessing Portlets from external systems (JAVA) ?
    I would like to access the content (or application) inside a Portlet...
    e.g. The Portal should host the Portlets and I would like to interact with the portlets.
    -does an external API exist ?
    -any problems signing on to the portal from an external system ?

    Hi,
    need to add the office 365 exchange online web api in Azure and set the required permissions.
    then following this video code we can connect with office apis
    http://www.microsoftvirtualacademy.com/training-courses/deep-dive-integrate-office-365-apis-in-your-mobile-device-apps?m=11496
    also following url can be referred if we need directly to communicate with office 365 api using Oauth authentication method.
    https://msdn.microsoft.com/en-us/office/office365/api/api-catalog
    Thanks,
    Nitesh

  • Add list item using anonymous user in public website of shareopint 2013 office 365

    Can any body know the solution to over come of following error while add list item using anonymous user using CSOM in shareopint 2013 office 365 public website.
    I have tried following solution to narrow down the error from "Access permission"
    http://sharepointtaproom.com/2014/08/28/anonymous-api-access-for-office-365-public-sites/#comment-2304

    Try below:
    http://www.codeproject.com/Articles/785099/Publish-a-Form-for-Anonymous-Users-on-a-Public-Sit
    http://blogs.technet.com/b/sharepointdevelopersupport/archive/2013/06/13/how-to-allow-anonymous-users-to-add-items-to-sharepoint-list-using-client-object-model.aspx
    // Allows AddItem operation using anonymous access
    private
    static voidAllowAnonAccess(){
    Console.WriteLine("Enabling Anonymous access....");
    SPWebApplication webApp =
    SPWebApplication.Lookup(new
    Uri(webAppUrl));
                webApp.ClientCallableSettings.AnonymousRestrictedTypes.Remove(typeof(Microsoft.SharePoint.SPList),
    "GetItems");
                webApp.ClientCallableSettings.AnonymousRestrictedTypes.Remove(typeof(Microsoft.SharePoint.SPList),
    "AddItem");
                webApp.Update();
    Console.WriteLine("Enabled Anonymous access!");  
    // Revokes Add/Get Item operation using anonymous access
    private static
    voidRemoveAnonAccess(){
    Console.WriteLine("Disabling Anonymous access....");
    SPWebApplication webApp =
    SPWebApplication.Lookup(new
    Uri(webAppUrl));
                webApp.ClientCallableSettings.AnonymousRestrictedTypes.Add(typeof(Microsoft.SharePoint.SPList),
    "GetItems");
                webApp.ClientCallableSettings.AnonymousRestrictedTypes.Add(typeof(Microsoft.SharePoint.SPList),
    "AddItem");
                webApp.Update();
    Console.WriteLine("Disabled Anonymous access!"); 
    http://www.fiechter.eu/Blog/Post/12/Create-a-survey-for-anonymous-users-on-Office-365
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • Can I use Replace function in a decode??

    Hello, I am trying to use replace function inside a Decode Function, Here is how I am doing it: select SUBSTR ( DECODE ( IH.DRVD_ALT_MAIL_ADDR_PRIM_FLAG, 'N', REPLACE ( ih.subs_addr_1 || ' ' || ih.subs_addr_2 || ' ' || ih.subs_city || ',' || ih.subs_

  • Help - I cannot add files to my playlist.

    I am using iTunes 7 and I cannot drag .mp3 files into my playlist nor can I import them via the file menu. When I drag and drop or add manually nothing happens at all. I have checked and double checked the file types. They are all .mp3 and they all d

  • Send Changes for IDOC ORDRSP

    Hi Gurus   Can anyone help me in sending the changes for the IDOC for transactional data. For Sales Order IDOC -- ORDRSP. When newly sales order is created, all the sales order information should be sent. --This is not a problem. When changes are don

  • Adobe app manager password reset

    Hi, I can't find a way to retrieve or reset my adobe application manager password. Anyone know how? Many thanks

  • ITunes re-opens after closing the application down.

    Lately, after I click the 'x' to close down iTunes, my computer slows down a bit, and iTunes opens itself back up and is mostly black instead of the normal color and look. Any ideas as to why this is happening?