PowerApps Device Information: IP, Browser, Computer, Tablet, Phone, etc...
Getting device information such as IP address and Screen Resolution are needed for PowerApps. There are requests out there to add it to the platform.
This morning I tried to see if I could make this work with a custom connector.
I created a PHP page on my personal server to return device information as JSON.
https://chrisclark.com/deviceinfo.php
Here is an example of what he call returns
{
"devicetype":"Computer",
"ip":"99.111.135.165",
"iphostname":"99-111-135-165.lightspeed.chrlnc.sbcglobal.net",
"iporg":"AS7018 AT&T Services, Inc.",
"ipcountry":"US",
"os":"Windows 10",
"browser":"Chrome 67.0.3396.87",
"brand":"Unknown Brand"
}
Now I created a custom connector in PowerApps to make the call.
I added the data source to my PowerApp and make the call. Unfortunately, as you can see, Azure is making the call, so what is returned is Microsoft's IP information. We do however get the browser being used.
Senior IT Engineer - SAP Basis Lead - SAP? Certified Associate
6 年Hi Chris, were you using something like this for the PHP (fast and giving enough details to start with: ?? <?php function get_browser_name($user_agent) { if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/')) return 'Opera'; elseif (strpos($user_agent, 'Edge')) return 'Edge'; elseif (strpos($user_agent, 'Chrome')) return 'Chrome'; elseif (strpos($user_agent, 'Safari')) return 'Safari'; elseif (strpos($user_agent, 'Firefox')) return 'Firefox'; elseif (strpos($user_agent, 'MSIE') || strpos($user_agent, 'Trident/7')) return 'Internet Explorer'; return 'Other'; } // Usage: echo get_browser_name($_SERVER['HTTP_USER_AGENT']); ?>