Using information from User Profiles Outside of SharePoint - web-services

I'm creating website that creates a page for each person in our department with their contact information. The page can then be linked to from a qr code on a business card.
What is the best way to get the information out of their SharePoint profiles?
edit: I'm not very familiar with creating stuff in Visual Studio. I'm using Ruby on Rails for the website and I've read SharePoint has REST services which would work great but I can't seem to figure out how to access the User Profile information.

You don't need to use Visual Studio. You just need to be able to use a SOAP based web service from Ruby. The documentation for the User Profile web service is here:
http://msdn.microsoft.com/en-us/library/aa980957(office.12).aspx

You can use the SharePoint UserProfile WebService to achieve this.
http://msdn.microsoft.com/en-us/library/ms494053.aspx
Or, if you need something more specific, you could create your own WebService which access's the UserProfile API like this -
using (var site = new SPSite("http://yourserver"))
{
var userProfileManager =
new UserProfileManager(SPServiceContext.GetContext(site));
var userProfile =
userProfileManager.GetUserProfile("domain\accountName");
//iterate the userprofile properties
foreach (UserProfileValueCollection prop in userProfile)
Console.WriteLine(prop.Value);
}

Related

Django Azure AD get user info

I am currently using django-azure-ad-auth package for user authentication purpose. I wanted to retrieve user information too like displayName etc, How do I go about implementing this?
You are using django-azure-ad-auth package which helps only for authentication purposes. You need to use API's likes MS Graph for getting the user information.
To use MS Graph with Python please follow MS document

Manage Sharepoint 2013 list email settings using CSOM

I am migrating a code written using server object model to CSOM. The server object model has code that deals with creating lists with incoming email enabled. It also has code to retrieve the email address of the list(s).
I want the CSOM equivalent of
while setting:
list.EmailAlias = "abc#abc.com";
While retreiving:
list.CanReceiveEmail
list.EmailAlias
I have tried to find reference on official site and other literature on the internet but found nothing. That's why I have turned to SO for an answer.
In csom List class, there is no property which equals to "CanReceiveEmail","EmailAlias", checked from Official document:
List members
If you are using SharePoint On-Premise, you can create a web service with SSOM and call with Client Script:
Create ASMX Service For SharePoint

Create a Magento admin user using the API

I want to create an admin user for a Magento store using the web services and not having to create it from the adminstrators web site. Is that possible??
Thanks in advance!
Check out this project: https://github.com/nvahalik/Wiz.
Wiz lets you do many cumbersome tasks (normally done in the Magento Admin Panel) from command line. Although it isn't a webservice, it allows you to skip the need of logging into the admin panel and clicking around.
BTW, one of these tasks is creating an admin user.
One approach that takes a bit of custom coding is to create a new API resource that can use the Mage::getModel('admin/user') model to create the admin user.
I found it, since I was trying to do all that in C#, here is the simple code to do that:
MagentoService proxy = new MagentoService();
string sessionId = proxy.login(username, password);
customerCustomerEntityToCreate ctc = new customerCustomerEntityToCreate();
ctc.email = email;
ctc.firstname = firstname;
ctc.lastname = lastname;
ctc.password = password;
proxy.customerCustomerCreate(sessionId, ctc);
First Step
Bind the new user to a predefined role. A role for the API must be created in System → Web Services → Roles before it can be assigned here.
Source
Second Step
Use SOAP v1/v2 or XML-RPC (in my case it's SOAP v1)
Here's the
Tutorial link. You can manage customer till manage order.
Hope this help.

Using Graph to get a list of all my App IDs

Does anybody know if it possible to pull a list of the IDs for all the apps that I own in Facebook?
I know that each app has its own ID in the Graph (an example is here), but there doesn't appear to be connection between that and the ID of the Facebook user who created the app.
Basically, I need to script a management tool.
The app profile pages should be visible at /me/accounts when you use an access token with manage_pages permission - i'm not aware of any other way to retrieve a list of apps you admin

django facebook app: Testing with Test Users?

I am creating a Facebook App. I would like to test this as real - or real-looking - test users.
How do I do this?
I know that it is possible to create test users via the code, but I have not seen examples of this using Python/Django. I'm also not really sure how to use these test users: can I log in with them for real via Facebook or what?
I would also like for me and a few friends to be able to add the App and test it, but without it being listed in the App Directory (I don't want anyone to stumble across it before it is ready). Is this possible?
Facebook provides an Open Graph API to create test users.
You can view the documentation here:
https://developers.facebook.com/docs/test_users/
How to create a test user (Your first question):
Get an app access token
https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials
Or use the graph explorer https://developers.facebook.com/tools/explorer/
Or the access token tool: https://developers.facebook.com/tools/access_token/
Create the test user
https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?installed=true&name=YOUR_DESIRED_TEST_USERNAME&permissions=DESIRED_PERMISSIONS_LIST&method=post&access_token=YOUR_APP_ACCESS_TOKEN
Or use the GUI manager for test users on the Open Graph section of your App management dashboard
https://developers.facebook.com/apps/YOUR_APP_ID/permissions
Choose "Add" under Test Users
1) Once you create the test users FB gives you a link you can use to log in, customize profiles and add photos, etc.
2) You can take a look at this CLI written in Python:
https://github.com/kcbanner/facebook-test-users
3) I am not sure, but I think you have a choice of whether to list or not list the facebook app in the directory. You can also limit access to certain users within your code by only allowing certain facebook ids access.