Microsoft Graph sending email error "Access is denied" - email

I am getting error "Access is denied" on sending a test email. Can anyone advise what settings did I missed?
enter image description here

You are using the Client credential flow (App Context), so you should not use Me here because the Microsoft Graph doesn't know the meaning of Me as it is not the user context where you are not using your user credentials.
So you should use the code something like this.
await graphClient.Users["Userid/UPN"]
.SendMail(message,saveToSentItems)
.Request()
.PostAsync();
Replace your code with above code. Make sure you give the UPN/userid of the user from whom you want to send the mail.

Related

Firebase Passing State(continue to website link) in Password Reset Email and email verification

I am using firebase for user authentication in my website. Trying to build a password reset flow where the user receives password reset email, reset's their password and then it is just redirect to the website with the given url.
Problem: I am able to send the password reset email and change the password for that account but when I click the continue button provided by the firebase.It throws following error in browser console.
Uncaught DOMException: Failed to execute 'assign' on 'Location':
'https://?link=http://mywebsite.com/?email%3Duser#example.com' is not a valid URL.
I am also getting the same error for email verification link also.
The url is whitelisted in Firebase's authorized domains.
Please help me!
Are you passing canHandleCodeInApp as true? This means you want the reset link to open in a mobile app if installed. If so, it looks like your FDL domain is not configured (it is resolving to empty string). You should go to the Dynamic links section in the Firebase Console and setup/agree to terms of service. This will update the link to something like: https://example.app.goo.gl/?link=.... You will be able to see that domain in the Console Dynamic links section.
Otherwise you can pass canHandleCodeInApp as false which would open the link via the web action callback URL set up in the email templates section of the Firebase Console. This link will not go through FDL unlike the latter.

How to customize message on ADFS 3.0 sign-in page for an account lock?

I am using ADFS3.0. Suppose I enter incorrect credentials into ADFS sign-in page it returns error message "The user name or password is incorrect".
If due to some reason I try to log-in to ADFS 3.0 with a locked out account still it returns same message which is I think is not correct.
At this point I want to show a custom message say "Account has been locked-out" in place of "The user name or password is incorrect".
Could anybody help me on it ?
You can customize those messages. (You can explain that the account could be blocked and to try later) / contact IT for assistance, etc.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn280950(v=ws.11)#custom-error-messages
The reason it returns the same message is because of security.
Different messages could give hints as to how best to mount an attack.
To know that an account is locked out, ADFS would have to do an LDAP query to AD and that type of functionality is not available.

Unexpected end of JSON input moodle

In moodle I am getting the following error on enrolling the user. But, User get enrolled in course when we check refresh the page but It shows the error on enrolling.
Also I am using role_assigned event in my custom auth block .Whenever I enroll user in course from enrollment methods the event get called succefully but when I try to enroll user in course from enrolled users my event doesnt get called and the error get displayed.
Please help me out.
The most typical reason is that you have debugging messages printed in the response from the server. Open your Web Developer Tools and inspect the request in Network tab. Check that the response from the server is valid JSON.

Sending Facebook message as specific page

I've facebook account and a fan page defined within this account.
I'm using XMPP to send private messages using the following Java code
http://yauritux.wordpress.com/2011/09/24/facebook-chat-with-smack-xmpp-api/
I can easily send and receive messages using my user id and password.
However when I try to use my page user ID I'm getting the following error:
SASL authentication PLAIN failed: not-authorized (stack below).
I tried to use pidgin but I'm getting the same error.
Let me know if you've a solution or direction on how to send a message as a page and not as a user.
Thank you in advance,
Moshe
SASL authentication PLAIN failed: not-authorized:
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:337)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:203)
at org.jivesoftware.smack.Connection.login(Connection.java:348)
at com.maiff.was.connectors.impl.fb.FBConsoleChatApp.login(FBConsoleChatApp.java:55)
at com.maiff.was.connectors.test.ConnectorTestMain.initFB(ConnectorTestMain.java:55)
at com.maiff.was.connectors.test.ConnectorTestMain.main(ConnectorTestMain.java:18)
Pages can only "reply" to user messages, and i am not sure if it even works with XMPP. Keep in mind that the Chat API is deprecated btw: https://developers.facebook.com/docs/chat/
Meaning, after April 2015 it will not work anymore, not even with users.
For Page conversations, there is a specific API endpoint to reply to messages: https://developers.facebook.com/docs/graph-api/reference/v2.2/conversation/messages

Login by Yahoo! account

I'm using Zend Framework 1.x to developer my Web Application. I want to create "Login by Yahoo! account" function. These options below are what I tried:
Using Yahoo! Socical API Client, but with PHP 5.3, it usually catch error "strict standards" about static and non-static, object and non-object methods.
I tried another way, using Zend_OAuth. But, this time, I got consumer_key_rejected error.
Both ways, I used OAuth to get user info.
Please help me to solve this problem or show me other ways to create "Login by Yahoo! account" function.
Thanks
EDIT:
With the second ways, if I just want to get basic user profile (Email, Name, Gender) it got consumer_key_rejected.
When I register for new scope (Contacts), I got oauth_token and oauth_verifer, but I stayed there, I don't know how to do next step to get user info.