Using broker authentication with ADAL library in Intune managed application - xamarin.android

I have searched the internet, and I think I understand every step of documentation provided by Microsoft in achieving the brokered authentication via company portal or Authenticator app.
As per documentation here.
If I use below signature
public PlatformParameters(Activity callerActivity, bool useBroker)
public PlatformParameters(Activity callerActivity, bool useBroker, PromptBehavior promptBehavior)
and provide "true" for userBroker parameter, I am good.
My only problem is.
I have downloaded ADAL library from NuGet and I found.
Version 5.0.5 -> PlatformParameters class doesn't have this constructor signature nor it has useBroker public property, how do I supply it?
Version 4.5.1 -> Does not have it either.
I kept on searching and I found this signature available in version 3.19.8
In such case, am I suppose to use 2 years old version, is there something I am missing?
Thank you in advance for any suggestions on it.

Fix was quite simple.
I just had to change the target framework to 8.1 from 8.0, and then I had to retarget the ADAL Nuget package.
After doing this I can use the latest version of ADAL, It has all the constructor overloads.

Related

Issue with Redemption embedded in application

We use a product from Epicor, I believe developed by mProof, called Clientele ITSM. The version we are using is 2016.2. We moved to Office 365 and since then are experiencing the error that started with Windows 10 (1809). The error message we receive from the application is:
System.Runtime.InteropServices.COMException (0x8000FFFF): System Error. Code: 18.
There are no more files
at Redemption.ISafeMailItem.SaveAs(String Path, Object Type)
at Clientele.Modules.Attachment.Client.Forms.AttachmentStatusBarPanel.AddEmailAsAttachment(MailItem mitem, Int32 numberOfEmailsSelected)
at Clientele.Modules.Attachment.Client.Forms.AttachmentStatusBarPanel.HandleDragDropEmail()
at Clientele.Modules.Attachment.Client.Forms.AttachmentStatusBarPanel.AttachmentStatusBarPanel_DragDrop(Object sender, DragEventArgs e)
I'm looking to see if there is a way to update the version of Redemption without upgrading the Clientele ITSM application? The DLL appears to be Interop.Redemption.DLL, and the version is 5.15.0.0.
I realize this is a long shot, and the likely correct answer is to upgrade the version of Clientele ITSM, but that is unfortunately not an option at this time.
Thanks for any help or advice.
Interop.Redemption.DLL is just a binary header file used by .Net. The files you need to replace are redemption.dll and/or redemption64.dll. They can be swapped without updating the application that uses it - all versions of Redemption are backward compatible.

A way to use unity.configuration in azure functions V2 - .net core

I have requirement to resolve dependencies from xml file and have used unity dependency injection.
Everythins is working fine in console and ASP.net core applications.
However in .net core functions below piece of code is returning null.
var unitySection = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
I have added app.config and unity.config and marked the properties to be copied to bin on build.
Default output type Function app is Class library, changed to console as well but no luck.
Any help is appreciated.
From v2, azure function doesn't support ConfigurationManager and you can refer to environment variables, you need to use System.Environment.GetEnvironmentVariable.
Please have a look of this reply of azure teams:
https://github.com/Azure/azure-functions-core-tools/issues/328#issuecomment-355697529
ConfigurationManager is only be used in azure function v1. From v2, it has been moved to a new configuration model:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration&view=aspnetcore-3.1
And not based on ConfigurationManager or its APIs any more.:)

Twilio: LookupsClient functionality not available in SDK 4.x

I am trying to resolve the following use case and the issue at hand:
Use case:
For a given number, we need to determine whether the phone number is landline or mobile.
Environment Setup:
Currently, we've Twilio Nuget v4.7.2 installed and it's showing assembly version '3.4.1.0'
Question:
Per the LookupsClient documentation link (https://www.twilio.com/docs/api/lookups), the following line 'should' work with 4.x SDK. However, appropriate namespace can't be found for:
var lookupsClient = new LookupsClient(accountSid, authToken);
Thoughts?
Screenshot Showing issue and Nuget Package Installation
ps: thank you for your time and help :)
Twilio developer evangelist here.
I am reliably informed that you are correct here and the Twilio Nuget package 4.7.2 does not include the Lookups package.
You have two options now.
Ideally, you should update to Twilio v5.0. This has been newly released, contains the Lookups package and will be supported going forwards.
If you cannot update to v5 then you need to install the Lookups package alongside Twilio v4.7.2. Then you can include it and use as expected.
Let me know if that helps at all.

Is there a list of classes, methods and API which will trigger RIMAPPSA2 permission when signing Blackberry application?

I understand why RIMAPPSA2 permission is thrown when signing a BlackBerry application. However, I don't know which classes, functions and/or API requires such permission.
Is there any way to find out (or better a documentation listing that information) ?
Regards,
RIMAPPSA2 permission is required when dealing with Blackberry Controlled APIs. In this particular case, I was definining new classes and redefining existing classes in one of the packages part of the Blackberry Controlled APIs.
Moving my classes to package not controlled by Blackberry Controlled APIs solved the issue.
I have just solved a similar problem for myself. As per my answer on BlackBerry RIMAPPSA2 signing key required — why?. I have updated this answer to help in case of future searches on similar words...
This might be due to a bug in Eclipse or RIM. You might not be using the RIMAPPSA2 classes.
OK, so its hard to believe but this page might fix the problem for some:
Frustrations with Blackberry Developer plugins for Eclipse
Basically its a bug, and by changing the Application Descriptor, saving, removing & re-adding the JAR file, the problem is fixed.
Follow-up #1 - might not work:
The above solution enabled me to build & sign the app. Unfortunately the app won't run on the phone Module 'MyApp" attempts to access a secure API.
Follow-up #2 - this worked for me:
I documented a full solution that worked for me here:
BlackBerry - use own JAR file in own project
In my case, I was importing my own JAR file, and I needed to set that project's build type to be a MIDLET. Setting it as LIBRARY or APPLICATION caused problems.

How to write policy redirect files for native SxS dlls?

Where can I find a good reference that explains how to write and install a SxS policy redirecting from one native assembly version to another?
I've already succeeded in building and installing two versions of my native assembly using a wix installer. But I'm not sure how to proceed from here. Most of the information I've found is about managed assemblies and the GAC. Is the procedure I'm looking for identical to that of managed dlls?
Thanks for the help,
Dan
[I'm the current maintainer for Native SxS at Microsoft]
Hi Dan,
A Publisher Policy is a special type of assembly. It's installed in the same way as any other assembly, but with type="win32-policy" and name="policy.MAJMINVERSION.name"
You can read more about it here
or you could look at how the CRT's policy is authored. On my Vista machine, it's located under
%windir%\winsxs\manifests\x86_policy.8.0.microsoft.vc80.crt_....manifest
Since it seems you are authoring a new assembly, providing a publisher policy just yet may not be necessary, as it only comes into play when it comes time to service your assembly (by redirecting old version to new).

Resources