I am using C# language and ASP.NET framework for linkedin integration
While authorization I have passed r_liteprofile,r_emailaddress within the scope and when I am trying to get the data of user I am facing the following issues:
When trying to get the data of the user using the API v1 (https://api.linkedin.com/v1/people/~:(id,firstName,lastName,picture-url,email-address)?oauth2_access_token={accessToken}&format=json) I am getting the 410 (Gone) error. { It was working previously}.
When I am trying to get the data of the user using API v2 (https://api.linkedin.com/v2/me?oauth2_access_token={accesstoken}&format=json) I am getting the 403 (Forbidden access) error.
For the purpose of authorization:
Previously I was using (https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id={apiKey}&redirect_uri={redirectURL}&state={uniquestringkey}&scope=r_basicprofile,r_emailaddress)
I also tried using the following authorization (https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id={apiKey}&redirect_uri={redirectURL}&state={uniquestringkey}&scope=r_liteprofile,r_emailaddress )
Can anyone please suggest?
Related
I am trying to get notification when user is updated on MS Azure AD using MS Graph and Web hook.I have tried microsoftgraph/msgraph-training-changenotifications but face following
Status Code: Unauthorized
Microsoft.Graph.ServiceException: Code: ExtensionError
Message: Operation: Create; Exception: [Status Code: Unauthorized; Reason: ]
I have also explore notifications for changes in user data this code but it is for "Mail.Read" permission and I want to "User.Read" permission .
My case/issue is like Not receiving a request on our MS Graph Webbook for deleting a User in AAD but something different. i need notification on update user on my asp.net core project.
Please help me. I am troubling since last 3 days but not getting proper solution
I was missing to give a permission in Azure AD
User.ReadWrite.All
I have watched this video Change notifications with Microsoft Graph and use this code msgraph-training-changenotifications .Now i got notification from Azure AD
We are using AD B2C for authentication on our web app. Last week we started receiving a 403.76 when calling our APIs that are hosted in Azure and locked down by Active Directory using our AD B2C tenant.
We haven't changed any config settings in AD when the change occurred. We rolled back all of our code which didn't help. We verified that our token is valid in jwt.io. We confirmed that our audience is correct and permissions was set properly in app registrations. We can see the easy auth error 403.76 when going in to "Diagnose and solve problems" section of the function app and drilling into 4xx errors.
The function app just does a GetAsync against Cosmos to get your user profile on sign in. However we aren't getting that far, as we are receiving a 403.76 when verifying our token with AD.
We should be able to do a GET against our API and receive data as we were before. Instead we get HTTP status 403 with a sub status of 76.
The error in "Diagnose and solve problems" section:
EasyAuth:AuthorizationCheckFailed. For more details, refer to HTTP Status Codes by EasyAuth Module
We banged our heads against a wall for five days, so I wanted to make sure this was posted on stack overflow for anyone else facing this issue. Especially since it affected customers.
After working with Microsoft 24/7 for the last three days, we finally received word that this was due to an issue on their end with EasyAuth. The workaround was to add this in our Configuration of the function app:
WEBSITE_AUTH_AAD_BYPASS_SINGLE_TENANCY_CHECK = true
I want to get the resource details of a logged user. I am using the REST API http:////_api/ProjectServer/EnterpriseResources/getByUser(user). Which parameter may I pass in the getByUser method?
Is there any REST API for getting resource details?
To get the details of logged on user using REST in sharepoint 2013 i use this REST endpoint
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/currentuser"
I m trying to fetch feeds by graph API using
https://graph.facebook.com/me/feeds?access_token=xxxxx
I tried with steps for getting short live access token,then using short live access token able to get long live access token
using long live access token i tried to fetch feeds but no data found
so using long live access token ,i tried following code for getting page access token
https://graph.facebook.com/me/accounts?access_token=LongLivedToken
but it i always found blank page access token.
please suggest which token should i pass for getting incoming feed using graph api
I think the problem is with the permission given to the access_token
to get the facebook feed , u need a read_stream permission from facebook, ie a access token with read_stream.
I'm trying to use Twitter's API and OAuth to send status updates (new Tweets). I am using Shannon Whitley .NET code example http://www.voiceoftech.com/swhitley/?p=681 (as recommended on the Twitter API docs). I can read (GET) using OAuth just fine, however when I try to send a status update via http ://twitter.com/statuses/update.xml (using a POST), it returns a 401 with the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<request>/statuses/update.xml</request>
<error>Read-only application cannot POST</error>
</hash>
I swear I have set up my application to use read and write, the authorise page at Twitter (http ://twitter.com/oauth/authorize) even says "The application TweeVerbs.com (Development) by would like the ability to access and update your data on Twitter."
Yet it's still saying "Read-only application cannot POST". WTF!?
I have googled this error message until I was blue in the face. I found somewhere that said to add the querystring paremeter oauth_access_type=write to the redirect URL which goes to the Twitter authorise page which I have done, but it still gives me a 401.
If it helps, here is the data that is getting sent back and firth as per the OAuth workflow:
Request Authorise Token:
http ://twitter.com/oauth/request_token?oauth_consumer_key=tViV8vAt4cqSKbGdPGWT7Q&oauth_nonce=2790042&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1244567068&oauth_version=1.0&oauth_signature=KzxcXN%2bQ0AJoAJ%2flQfzs8SLjC%2fQ%3d
Generated Authorize Redirect URL:
http ://twitter.com/oauth/authorize?oauth_token=EpyBg3nJGOmtmBjRUAsqqaGHARb2F2F2VcccqHkwio&oauth_access_type=write
Authorise Screen Message: "The application TweeVerbs.com (Development) by would like the ability to access and update your data on Twitter. This application plans to use Twitter for logging you in in the future. Sign out if you want to connect to an account other than Sironfoot."
Get Access Token:
http ://twitter.com/oauth/access_token?oauth_consumer_key=tViV8vAt4cqSKbGdPGWT7Q&oauth_nonce=2016804&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1244567166&oauth_token=EpyBg3nJGOmtmBjRUAsqqaGHARb2F2F2VcccqHkwio&oauth_version=1.0&oauth_signature=%2bEVQUxUPLT%2b%2bkfaG0Vq1YJZXcAw%3d
Status Update API call:
URL - http ://twitter.com/statuses/update.xml
POST data - oauth_consumer_key=tViV8vAt4cqSKbGdPGWT7Q&oauth_nonce=5707692&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1244567268&oauth_token=19130957-nb89DjZhjCAzcbHUa96yRWHqlQFQIJ0AKyXpqnHt1&oauth_version=1.0&status=HelloWorld&oauth_signature=WqA%2bWY0IxveeSJ7G3Ewy3whh1sE%3d
I don't know what the problem was, but I deleted my Application registration on Twitter (You have to register apps in Twitter to get OAuth keys etc.), and then recreated it. Now it works fine. Weird, probably a problem with Twitter screwing up.
I'm also using Tweetsharp (http://tweetsharp.com/), highly recommend it, it's got a nice fluent API. Note: switching over to Tweetsharp wasn't the fix, I had already switched over and had the same problem until I delete and recreated app registration on Twitter.
If you authorized your application to access your Twitter account when the application was set in "read only access" mode and you get the "Read-only application cannot POST" error after changing the application settings to be "read and write access" then you have to revoke access to the application on https://twitter.com/settings/connections and then reauthorize it. The "read only" access_token tends to be sticky until you revoke it.
Go to http://www.twitter.com/oauth_clients
Select your App.
Edit Application Setting.
Set Default Access type to Read & Write.
Save & Run.
Hope this helps.
plus also see if your system's CLOCK is synched with internet; on windows you can do it by adjusting date time settings
because if you CLOCK is not synched you will get 401 unauthorized exception; best of luck
cheers
I've dont that several times now, without succes, I'm getting a 401 exception while requesting an acces token from twitter.
I'm using Tweetsharp as well as you.