I am working on Xamarin.Android app that needs to download documents from SharePoint Online (SPO) in the background thread (using SPO REST API right now). Users should be using an app, while it is quietly retrieving documents from SPO.
I have no experience working with Intune MDM or MSAL library for authentication. Android device is corporate-owned (COD) and enrolled in MS InTune. Is there a way to pick enrolled on-device user details and pass them with requests to SPO?
Options that I am investigating are:
Integrate InTune SDK into app
Use MSAL library with the app registration in Azure portal for authentication
I am trying to avoid using WebView/browser for SSO if possible at all.
It looks like there are no experts here in this field, so after a lot of research and trials I worked out the solution. InTune SDK integration is not required if an Android mobile device is enrolled through InTune MDM, because Microsoft Authentication Library (MSAL.NET) can use Intune Company Portal app (or Microsoft Authenticator) as a broker. Your Xamarn.Android app needs to be registered in Azure portal following these steps https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app and adopting steps in this https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-android-single-sign-on tutorial to Xamarin.Android makes authentication work.
One point to note is that you need to specify and give admin consent for Graph and Sharepoint permissions to read User, Sites and Files.
Related
I'm using EWS in a Windows Service to access different users calenders. Since office 365 basic authentication is deprecated I need to add support for OAuth. I followed the steps in this link Authenticate an EWS application by using OAuth and it works fine. However, my application is used by many customers and what I don't understand is what my customers are supposed to do. Do they also have to add my application in their 365 account? I was under the impression that a customer could find my app in a global directory or something, but I can't find any information about it.
I need to be able to deploy bot framework solution fully automatically from a .net web app.
The resources I am able to create with ease (using Microsoft.Azure.Management.Fluent) are:
app service plan
Web App with bot backend
azure storage
The resources that I want (and can't) are:
"Wab App Bot"
"Cognitive Service" with LUIS (this one is optional for know, but it would be really great if I can also create this kind of resource from code)
I have configured service principal with necessary rights.
You can find the code samples to create Azure app bot and Cognitive Service under the SDKs.
Azure app bot https://github.com/Azure/azure-sdk-for-net/tree/psSdkJson6/src/SDKs/BotService
Azure Cognitive Service https://github.com/Azure/azure-sdk-for-net/tree/psSdkJson6/src/SDKs/CognitiveServices
My though on this to enable the continious deployment for the bt code using GitHub or AzureDevOps, following link will help you set up the CD for the bot
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-build-continuous-deployment?view=azure-bot-service-4.0
As for the LUIS application, what I end up doing is to use PowerShell / C# app to deploy the LUIS app definition using the LUIS REST api https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c2f
I want to upload files to a specific folder on my onedrive using C# in web application. I am not able to find any sdk for that. All i can find is sdk for windows phone application. Thanks you in advance.
The OneDrive SDK is still valid for use in any .NET language/platform, including ASP.NET.
For web-based applications, you'll need to handle authentication yourself though. Because of the various ways of authentication a web app, the SDK didn't provide a prescriptive authentication solution for web apps.
You can either code the OAuth 2 implementation or use an existing library to connect it up (like using OWIN). Once you have an access token for OneDrive, you can provide the token to the SDK and then use the SDK as normal.
The webhook sample project in the OneDrive org has an example of how to provide an access token directly to the OneDrive SDK by way of creating a OneDriveAccountServiceProvider.
I am developing a Xamarin PCL app using Xamarin.Forms and have a requirement to log in to it through Azure Active Directory. I have tried to achieve this by using Xamarin.Auth, however it seems that Azure AD doesn't support implicit grant flow as pointed out in the following link:
getting #error=unsupported_response_type&error_description=AADSTS70005: with token request
I am receiving the same error as described in that link. Does anyone have any idea how to go about this? I basically just want to be able to load the following page : https://login.microsoftonline.com/, log in using my azure active directory and on receiving a valid token, load the first page of my app. This is a requirement for all 3 platforms (Android, iOS and WP8), although right now I am just trying to get it to work on Android.
Many Thanks
in Azure AD we don't uswe the implicit flow for native clients - we use a public client version of the authorization code grant. If you want to work with AAD and Xamarin in a PCL we have a preview of the next version of our libraries, you can find more details in http://www.cloudidentity.com/blog/2014/10/30/adal-net-v3-preview-pcl-xamarin-support/. Note that such library is a very early preview that WILL change and that cannot be used in production at this point. An alternative is using Xamarin bindings to our iOS and Android native libraries, but those aren't suitable for a PCL.
I developed/deployed a very simple autohosted app to SharePoint Online 2013 but has a URL that looks like this. Don't click on this link.
https://1e9a4afa-c77b-460e-3375a-8eded45c2200.o365apps.net/Pages/Default.aspx?SPHostUrl=https%3A%2F%2Fwhatever%2Esharepoint%2Ecom%2Fsites%2Fdev&SPLanguage=en%2DUS&SPClientTag=2&SPProductNumber=16%2E0%2E1922%2E1221
Confused..
It never asked me for Azure account information, will I need one if I plan to run c# code?
How do I deploy this app to other site collections on SPO 2013 o365 and provision who in SPO can use it?
If you want to install app for your SharePoint Online you should add it to App Catalog or public SharePoint App Store.
If you don't want to sell your app use App Catalog here is info about that