How MS Teams auto logs into Azure AD - electron

I tried few plugins to implement Azure AD auto-login functionality to an Electron app, but each of them had login issues described here if I choose file system URL(file:///).
This is because Electron apps run on file system URLs and Azure AD doesn't accepts a file system URL.
As much as I know, MS Teams is build on Electron.
How have they achieved it?
Do I need to run a local server like electron-with-express?

Related

QB Desktop PHP integration via web-connector on system having multiple company files

QB desktop 2021 Enterprise version,
Multi-user mode not enabled,
qwc: Quickbooks Web connector
I am using Consolibyte's PHP sdk to connect QB desktop with our CMS. I am pulling some accounting reports from the QB desktop. My concern is that we have some 10 different company files (10 different clients). I need to pull the report for each client so I have prepared 10 QWC connections i.e one for each company file. My concern is that I cannot set Auto-Run for each web-connector setting (despite of having a gap of 1 hour between each entry). While installing qwc file, I have set automatically open the company file if not open("Always allow access even if Quickbooks is not running") but I keep on getting below error message when ever Auto-run tries to execute the configured app. I get the same error even if I do not open the QB company file in the QB and tries to run the same manually
Application requested to Abort
If I open up the company file in QB and then select the qwc application and select "update selected" then it works fine.
This is creating concern as I am not able to run the qwc apps automatically and have to run it manually. I will be having 50 company files and running it manually is time consuming. Can anyone please guide me as why it needs the company file to open prior running the web-connector (then what is the use of selecting ("Always allow access even if Quickbooks is not running")) and in that case automatic execution of qwc app not possible as somebody has to open the company file first. Kindly guide
Adand,
I had faced similar problem with consilbyte SDK for QBD web connector integration.
Sometime the problem is that QBD services are running in background and connected to one of the company, which we don't know where.
so in order to reset all things and try once again, you should kill following services which are running in your windows PC. and then start all company sync in web connector.
This should solve your problem. if not then share the web connector log file. so i can investigate and provide solution.
additionally you should try these solutions specific to Web Connector https://quickbooks.intuit.com/learn-support/en-us/help-article/open-programs/fix-common-web-connector-errors-quickbooks-desktop/L9slolvg0_US_en_US
I have found the solution for problem. Issue was that when we have multiple company files and if we want QWC to open up the right company file automatically then we have to set the company file path for each QWC user in the QB table (Consolibyte PHP SDK) "quickbooks_user"
UPDATE quickbooks_user SET qb_company_file = 'C:\path\to\your\file.QBW' WHERE qb_username = 'your-web-connector-username'
I have found this answer through below stackoverflow threads
Error in web connector when quickbooks not running
How to set .QBW file path for response in Authenticate for Quickbooks Web Connector?
and from Wiki pages by Keith/Consolibyte:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_php_consolibyte#how_can_i_tell_the_web_connector_to_connect_to_quickbooks_even_if_quickbooks_is_not_open
I have tried this and it works. QB company file is opened up in background by QWC, data pulled and then company file is closed by QWC. I am hopeful that this inbuilt solution will allow me to automate 50+ QWC executions.

Unable to register app (iOS app) on Azure portal

I am following the link to integrate One Drive SDK into an existing iOS app. I have an free account created on azure portal. Its a work account so I can see a default Azure Active Directory.
During this process, I need to register the app on the Azure portal. This link for registering apps and generating app ID does not work in my case.
I am unable to create an app ID or access existing active Azure Directory details. The portal shows me restricted access page as mentioned in this link : https://learn.microsoft.com/en-us/answers/questions/352443/microsoft-azure-free-trial-no-access-to-acitive-di.html. The solutions mentioned in this link does not work for me as those options are not seen on the screen.
Any kind of help in understanding the trouble will be of great help!
This might be due to insuffient permissions as this is a free trial account.
Go to your Overview pane of your subscription and check if there are any directories present.
If not try creating a free trial account using a Work or school account and there you will be provided with a default directory. Then Create new Azure AD Tenant and then Connect your Azure free subscription to your new Azure AD Directory.
REFERENCES:
Associate a subscription to a directory.
Create a new tenant for your organization.

Controlling an application's API access to a SharePoint site

I have an external program that I have scheduled to run once a day (i.e. no user interaction). This program should upload a file to a SharePoint Online site, using Microsoft Graph API. I'm able to enable this in Azure Active Directory by registering an app, and giving this app the application permission File.ReadWrite.All, then sending a PUT request to
https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{parent-id}:/{filename}:/content
However, by granting File.ReadWrite.All, the program will have access to all files in all site collections for my organization. I want to limit access to a specific site, or perhaps just a specific folder within that site. How can this be achieved? (without the need for a user to interactively sign in when the program is run)
Edit (2021-03-04): This is possible now: https://developer.microsoft.com/office/blogs/controlling-app-access-on-specific-sharepoint-site-collections/
It is not currently possible to restrict app-only access to a specific SharePoint site, through Microsoft Graph.

Get Azure Active Directory token from an electron app

What would be the best way to obtain an AAD token from an electron app?
Microsoft has 2 javascript authentication libraries: adal.js and msal.js.
Both are designed for browsers and not native Electron apps (For example - AAD won't allow for file:/// scheme as a reply URL).
Sounds like a long term solution would be native AAD packages (like Microsoft built for Apache Cordova), but since that's probably not going to happen any time soon, what is the best short-term option?
Azure Storage Explorer is a good example of an Electron app that does this. It even allows for being logged into multiple AAD accounts at the same time.
You might be able to check out what's going on in the app's dev tools. I've had a poke around and it looks like it uses adal-node npm package instead of the browser based js libraries.
It also looks like it uses an authorization code flow for obtaining tokens.
The Azure AD doesn't support the file protocol as the reply address. To develop the single page application, you can host it on the server and using the server URL as the reply address.

iOS App Authentication with Windows Azure AD

Is this possible to authentice iOS Mobile App with Windows Azure Active Directory(AD) with utilizing mobile web services of Azure.
Basically iOS App should be login with only the Windows Azure Active Directory(AD)
I found one third party library
https://github.com/MSOpenTech/azure-activedirectory-library-for-ios/
but not sure whether this is secured or should be used or not
Microsoft Open Technologies (MSOpenTech on Github) is Micrsoft's official approach to helping open source communities both on and off the Microsoft platform. This should give you confidence in the legitimacy of the code on Github. See here for more details: https://msopentech.com/

Resources