Hi (i'm new to this so you'll need to forgive me)
My end goal is to be able to grab an attribute from Microsoft azure active directory for use in my app. The issue being that while i have done a fair amount of research i'm still at a loss of how to achieve my end result.
I have found that Microsoft has an API of sorts that allows authentication with azure AD but i'm unable to find any information as to how i query an attribute.
Possible solutions I've looked into:
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-android (Microsoft's android AD API)
Using Java to find simple Active Directory Information (this isn't a possible solution as i need azure integration as the AD server isn't outward facing).
I'm sure that the solution to this isn't a complex one but i would be grateful if someone could point me in the right direction. I don't have much experience with AD which is why i'm struggling here.
You could learn how to integrate Azure AD into an Android app from here . You could call Microsoft Graph API or Azure AD Graph API to access AAD resource :
To call Microsoft Graph API/Azure AD Graph API from Android Native Client application , In Settings blade of that app in azure portal, select Required Permissions and select Add. Locate and select Windows Azure Active Directory(Azure AD graph api )/Microsoft Graph(microsoft graph api) , add the appropriate permissions under Delegated Permissions .
To get access token With ADAL for android :
mContext.acquireToken(MainActivity.this, resource, clientId, redirect, user_loginhint, PromptBehavior.Auto, "", callback);
resource is required and is the resource you're trying to access.So you need to set that value to "https://graph.windows.net" if you want to call Azure AD graph api , and "https://graph.microsoft.com" if you want to call Microsoft Graph Api.
Related
I have registered an app in the Azure AD portal and given Microsoft Graph API permissions to fetch user data (user.read.) and yammer feeds.
Note: the app is also registered with the yammer portal.
App auth is working fine if I have used a single scope but it fails in case of multiple scopes.
cases :
Working fine in single scope case
val SCOPES = arrayOf("https://graph.microsoft.com/.default")
Not Working in multiple scope case
val SCOPES = arrayOf("https://graph.microsoft.com/.default", "https://api.yammer.com/user_impersonation")
We are using Graph SDK in Android.
Thanks in Advance.
please suggest a way to achieve the solution.
You have set two scopes from different resources, which is not supported.
Because, finally you will get an Azure AD access token. However, the aud claim in the token can only represents one resource.
Conclusion:
You can add more than one scopes from one resource. For example: https://graph.microsoft.com/User.Read.All, https://graph.microsoft.com/Mail.ReadWrite and other scopes from Microsoft Graph.
If you want to get token for more than one resource, you need to get tokens for them separately.
I think we can add just user.read.all, mail.readwrite etc too without prefixing with entire graph URL, just that it needs to be comma separated.
I have implemented AdMob using SDKBox for the cocos2d-x android project as well as the iOS project the same implementation works fine for iOS but on android, it is throwing an error that No Fill from the server. Failed to load the ad.
Error code 3.
Any help is appreciated Thanks.
The error code say that the ad server cant supply an ad for your request Reference
Ad fill depends on several parameters, main ones are Geo location of the user, device model and app content rating...
From what country are you making the request? try to use a proxy and request an ad as a US user, admob supply close to 100% for US users
I'm implementing the Facebook Audience Network SDK across iOS and Android. I set certain flags by checking a dictionary for the existence of an Ad, by looking up the Ads placementId. On iOS you can access this via the delegate methods easily, as below:
- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error
{
NSLog(#"Adview placement id is: %#", adView.placementId);
}
However on Android, the Ad object (in the Ad's listener) doesn't seem to have a placementId property as it's encapsulated. So this is either the usual inconsistencies between third-party SDK's cross platform, or i'm missing something?
Is it possible to retrieve the Ads placement id directly from the Ad object on Android, as you can do on iOS?
(Note: Facebook's docs don't seem to mention it)
Have you checked the AdView object in the Android implementation? it contains the placementId as well.
I need to verify the spam score of mobile numbers using Truecaller API .I found documentation here . In the API URL , I need to send a APPKEY , But how to get that ? there is no registration page for Truecaller API .
https://api.truecaller.com/v1.0/search.json?userKey=APPKEY&phone=NUMBER
Any help will be appreciated...
You should Read this Document for Name Search API
it Says that....
The one thing to keep in mind is that all requests to our API require
authentication. For that, you will need to use a User Key (userKey)
along with your requests. These access details basically associate,
your server, script or program with a specific application. All
requests to the API must be made over SSL (https:// not http://).
It means you have registered Truecaller developer account then Do Login and get your Access Key(USER KEY) and pass it everytime you request to access API..
But I Think Truecaller API is not accessible for public users...
Read This Article for More Details : http://www.3scale.net/2013/05/truecaller-api-search-among-over-600-million-phone-numbers-worldwide/
Why don't you try this?
callerpy
Here is the explanation from the developer:
Truecaller Name Retriever.
Since my request for the API was rejected, I commenced using python parsing libraries.
Callerpy emulates the process one would encounter if using a web-browser.
I tried it, and it works like a charm from the command line.
I am trying to develop a Moodle Android app. I am using MoodleREST source code for my reference.Is there any other documentation on Moodle site which documents moodle core webservice functions with their required params.
I have found list of functions here http://docs.moodle.org/dev/Web_services_Roadmap but could not get proper documentation on how to call these functions with required params from mobile client using REST.
I am new to moodle and still learning it, so my question can be a little naive so please bear with it :)
This could be helpful http://docs.moodle.org/dev/Creating_a_web_service_client
And if you have some administrator access to Moodle, go to
yourmoodle/admin/webservice/documentation.php , or
Administration > Plugins > Web services > API Documentation.
There is API with documentation. (Dont know if there is better way though :/)
D.
AIUI you need admin to access the most comprehensive web service API, as described by #Dolfa. You'll need these docs and/or the source if you're developing against their REST API. The API docs are generated from the source, presumably so they accurately reflect the API in the installed version.
You could:
Browse the code on github
Clone the version you intend to program against so you can browse the code locally
Install it and give yourself admin so you can browse the API docs.
If you don't want to go through the hassle of setting up a local Moodle instance, you may be able to figure out a way to run the php that generates the docs.
Once you have a rough idea of an API call, you can often find out the details by looking at responses to command-line requests e.g.
curl 'https://your.domain/webservice/rest/server.phpmoodlewsrestformat=json' --data 'wsfunction=core_enrol_get_users_courses&wstoken=[your_ws_token]' --compressed | python -m "json.tool"
gives the response
{
"debuginfo": "Missing required key in single structure: userid",
"errorcode": "invalidparameter",
"exception": "invalid_parameter_exception",
"message": "Invalid parameter value detected"
}
indicating that the function requires a userid=[userid] argument.