I am creating an application using ASP.NET MVC which has to integrate with salesforce.
I have created a developer account and also a trial account for Salesforce. Using my developer account I am able to achieve my desired outcome however when using my trial salesforce account I get this error
"The REST API is not enabled for this Organization."
I have also used another developer account of my mate it worked fine.
You are using Trail Edition (i.e. Professional Edition). Trail Edition doesn't include API access. If you want to try out api please use Developer Edition. Trial Edition expires after 30 days, but DE account doesn't expire.
Here is the list of salesforce editions with api access.
Related
I am building an Excel Web Addin. I'll need to authenticate the user against Office 365 and publish the addin to AppSource / Office Store. What is the ideal authentication method to use?
I found tutorials for SSO authentication, but then I read on https://learn.microsoft.com/en-us/office/dev/add-ins/develop/sso-in-office-add-ins : "The Single Sign-on API is currently supported in preview only. It is available to developers for experimentation; but it should not be used in a production add-in. In addition, add-ins that use SSO are not accepted in AppSource."
Does this mean SSO applications will still not be accepted to the Store? What authentication flow should I use then? I only need the user to sign in a access my Web API via this identity. If possible, the user shouldn't need to reenter their credentials. Is there a code sample I could follow to get this done?
AppSource is not accepting add-ins that use the preview SSO system at this time.
To authenticate a user with a Microsoft Account or a Work or School (Office 365) account without SSO, the user will need to sign in again even if she or he is already logged into Office. Without the SSO system, the add-in has no way of knowing who is logged into Office, just as an web app open in a browser wouldn't know if Office is running on the machine or who is logged into it.
(Your choice of flow might be affected by whether you have a single page app (SPA) or a server-generated UI. Since you mentioned you have a Web API, I'll assume this is not a SPA.)
I don't know of any sample Office Add-ins that only authenticate the user; but there are a couple that log in the user and then use the Auth Code Flow to get an access token to Microsoft Graph.
PowerPoint Add-in Microsoft Graph ASPNET InsertChart. The Office app is PowerPoint, but the auth-related code would be the same for Excel.
Office Add-in Microsoft Graph ASPNET. This is nearly the same, but has Excel as the Office app. It's not polished. (See the Known Issues in the readme.)
But please keep in mind that an Office add-in is just a web app and -- with one exception -- authorizing a user is the same in an add-in as it would be in any other web app. So, you should be able to use the samples in Azure AD Quickstarts.
The one exception is that you have to open the AAD sign-in page in a special dialog window that is invoked with the Office.js displayDialogAsync API. The 2 samples I linked to above do this. You can get detailed guidance about using the Dialog for auth in the article Dialog API in Office Add-ins.
BTW, Microsoft is in the process of improving its documentation and samples for non-SSO auth. We hope to get these improvements published over the next few weeks.
I want to use Microsoft Graph to send our company mobile app push notifications as discussed at Microsoft Build 2019.
I am following Integrate with Microsoft Graph notifications. It directs me to create a "Developer Account" to use the Partner Portal but my company already has an Enterprise Azure account with Microsoft and we leverage Azure AD.
I've tried the "Onboard" step but then I read "To get started, sign in to the Partner Center dashboard using your Windows developer account (you cannot use an Azure AD account)". I'm very confused.
Also, the Partner Portal shows no items under the menu no matter how I signed in. I tried using a personal account and my AAD account and I get the same result. No menu items at all.
I'm not sure where you're getting a "Developer Account" from but the first step is registering your application. This gives you an Application Id and Secret which is required to authenticate against Graph:
In order for your application service to integrate with Microsoft Graph notifications, you need to register your app with the Microsoft identity platform to support Microsoft accounts or work or school accounts, and declare the API permissions that are required.
With regards to the windows developer account, this is explained in the documentation:
If you don’t already have a Windows developer account, you’ll need to create one. For details, see Opening a developer account. You need to do this even if you don’t plan to build a Windows UWP application. If you’re building a school or work application as part of an enterprise, you can associate your developer account with the appropriate Azure AD account that is used for managing your enterprise submissions. For details, see Associate Azure Active Directory with your Partner Center account.
I am integrating Onenote with my application. I am using MS Graph API's for getting data from Onenote. To consume the api's I am generating the token as mentioned at link get auth tokens.
I am registering my application at MS application registration portal. Do we need to purchase any kind of paid license to use services provided by MS graph API's.
The app registration process seems simple and doesn't differentiate between applications that can be used in production/test environment.
The app registration process seems simple and doesn't differentiate
between applications that can be used in production/test environment.
Apps registered in the app registration portal can be used for production or test environments. There isn't any switch that needs to be set when you're ready to ship. Congrats on shipping your app to production!
Do we need to purchase any kind of paid license to use services
provided by MS graph API's.
We don't charge for access to the API. Some of the services exposed in Graph via APIs require licenses like Intune. It sounds like you're using OneNote so as long as users of your app are already using OneNote you're fine to access their notes via our API. Just be sure not to DDOS us :)
If you can share, our community would love to hear about your app!
I have the following requirements:
Create a MVC site with Azure AD authentication.
Fetch lists from SharePointOnline/O365 which also uses the same Azure AD.
Fetch lists from SharePointOnline/O365 anonymously (is it even possible?)
Thanks to VS2015 the first step is trivial.
But how to authenticate the current user in SharePoint? User.Identity does not provide password, so I cannot use ClientContext.Credentials.
I heard there is some Token Provider but haven't found a working case yet. Can anyone help me out?
To get the list of SharePoint online from our MVC sites, you can consider using the Microsoft Graph REST API instead of CSOM.
You can refer here about the list operation of Microsoft Graph. However, since this API is in beta version, it is not recommend to use in the product version.
And you also can refer the link below to get started developing with Microsoft Graph:
App authentication with Microsoft Graph
I recently integrated Salesforce API via databasedotcom gem to my Rails 3.2 app.
Also, there's a background job for the synchronization of data.
Upon, logging in my Professional edition Salesforce account, the Resque job failed and it displayed this error...
Class
Jobs::Salesforce::Contact
Arguments
1
Exception
Databasedotcom::SalesForceError
Error
The REST API is not enabled for this Organization.
How will I be able to enable API even for Professional Editions?
I've tried to use Developer Edition and got no problem.
Are there specific editions that are allowed to use REST API in Salesforce?
How about trial version of Professional Edition?
Thanks. And Have a great day!
By any chance are you on Developer Edition? verify that you have the “API Enabled” permission.
In case of Professional Edition you may have to contact Salesforce support to enable API.
For EE and UE it is automatically enabled.
below are the two links that may help you
https://github.com/heroku/databasedotcom/issues/49
https://success.salesforce.com/answers?id=90630000000gnjCAAQ