Outlook ошибка 403

Problem:

When you go to access your Outlook Web App website you receive the following message:

Server Error 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

 MSExchange-OWA403

Solution:

In Exchange 2007 and Exchange 2010 Outlook Web Access (OWA) uses HTTP Secured (HTTPS) by default and therefore when you type the URL you must type https://server.domain.com/owa instead of http://server.domain.com/owa

You can also configure your server to automatically redirect http request to OWA web site as https requests:

  1. Log onto your Exchange server hosting the Client Access Server (CAS) role
  2. Open the IIS Management console (Start -> Administrative Tools -> Internet Information Services (IIS) Manager)
  3. Expand the ‘Default Website’ and click on ‘OWA’
  4. From the main window, click on ‘HTTP Redirect’
  5. Place a tick next to ‘Redirect requests to this destination’
  6. Enter in the full https address for your OWA install.

MSExchange-OWARedirect

Detailed instructions can also be found on Microsoft Technet:

  • for Exchange 2007: How to Simplify the Outlook Web Access URL
  • for Exchange 2010: Simplify the Outlook Web App URL

I am trying to connect to Office 365 to use the client credential flow.I have followed all the steps as mentioned in http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx

I am trying to connect using the ADAL java library.

Using the below code to connect and fetch mail:

String authority = "https://login.windows.net/tenant-id/oauth2/authorize";
ExecutorService service = null;
service=Executors.newFixedThreadPool(1);
try {
    AuthenticationContext authenticationContext =  new AuthenticationContext(authority, false, service);
    String certfile = "PfxFinal.pfx";
    InputStream pkcs12Certificate=new FileInputStream(certfile);

    String token = "";

    AsymmetricKeyCredential credential = AsymmetricKeyCredential.create("clientid", pkcs12Certificate,"password");
    System.out.println("X509 is fine!");

    Future<AuthenticationResult> future=authenticationContext.acquireToken("https://outlook.office365.com", (AsymmetricKeyCredential)credential, null);// authenticationContext.acquireToken("https://outlook.office365.com", credential, null);
    System.out.println("Token Received "+future.get().getAccessToken());
    token=future.get().getAccessToken();
    System.out.println(token);


    URL url = new URL("https://outlook.office365.com/api/v1.0/me/folders/inbox/messages?$count=true&$filter=isread%20eq%20false");
    HttpURLConnection con = (HttpURLConnection) url.openConnection(); 
    con.setRequestMethod("GET"); 
    con.setRequestProperty("Accept","application/json"); 
    //con.setRequestProperty("Authorization",token);
    con.setRequestProperty("Authorization","Bearer "+token);
    System.out.println("Bearer "+token);

    if (con.getResponseCode() != 200) {
        throw new RuntimeException("Failed : HTTP error code : "
                + con.getResponseCode());
    }

    BufferedReader br = new BufferedReader(new InputStreamReader(
        (con.getInputStream())));

    String output;
    System.out.println("Output from Server .... \n");
    while ((output = br.readLine()) != null) {
        System.out.println(output);
    }

    con.disconnect();
} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

I have given the full permission for the tenant.Is there anything else , that I have to do in order to fix this issue.

asked May 26, 2015 at 10:35

Anupam's user avatar

You are addressing the «/me» endpoint, which for «app-only» access has really no meaning as «me» represents a mailbox and the access token has no user context that could be used to determine what «me» mailbox is attempted to access. For app-only access token you must use users(‘the mailbox e-mail address to access’). «app-only» represents an application identity with no information about mailboxes or users.

Let me know if you still have issues.

Thanks,
Matthias

answered May 26, 2015 at 15:08

Matthias Leibmann's user avatar

8

What Exchange Online permissions did you configure when you registered the application in Azure AD? You should have either Read mail in all mailboxes or Read and write mail in all mailboxes.

answered May 26, 2015 at 13:20

Jason Johnston's user avatar

Jason JohnstonJason Johnston

17.2k2 gold badges20 silver badges34 bronze badges

1

This is resolved and below is a full working code:

public class AccessToken {
public static void main(String[] args) {

String authority = "https://login.windows.net/xxxxxxxxxxxxx/oauth2/authorize";
ExecutorService service = null;
service=Executors.newFixedThreadPool(1);
try {
    AuthenticationContext authenticationContext =  new AuthenticationContext(authority, false, service);
    String certfile = "pfx.pfx";
    InputStream pkcs12Certificate=new FileInputStream(certfile);

    String token = "";


    AsymmetricKeyCredential credential = AsymmetricKeyCredential.create("id", pkcs12Certificate,"password");
    System.out.println("X509 is fine!");

    Future<AuthenticationResult> future=authenticationContext.acquireToken("https://outlook.office365.com", (AsymmetricKeyCredential)credential, null);

    token=future.get().getAccessToken();

    Long uuid = UUID.randomUUID().getMostSignificantBits();


    URL url = new URL("https://outlook.office365.com/api/v1.0/users/email/folders/inbox/messages");
    HttpURLConnection con = (HttpURLConnection) url.openConnection(); 

    con.setRequestMethod("GET"); 
    con.setRequestProperty("Accept","application/json"); 
    con.setRequestProperty("User-Agent","Testing/1.0 abc/1.1");
    Date date = new Date();

    SimpleDateFormat ft = 
              new SimpleDateFormat ("E, dd MM yyyy hh:mm:ss zzz");

              System.out.println("Current Date: " + ft.format(date));
              String dateString = ft.format(date);



    con.setRequestProperty("Authorization","Bearer "+token);


    if (con.getResponseCode() != 200) {
        System.out.println(con.getHeaderFields());

        throw new RuntimeException("Failed : HTTP error code : "
                + con.getResponseCode());

    }

    BufferedReader br = new BufferedReader(new InputStreamReader(
        (con.getInputStream())));

    String output;
    System.out.println("Output from Server .... \n");
    while ((output = br.readLine()) != null) {
        System.out.println(output);
    }

    con.disconnect();

    service.shutdown();
} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

}
}

I am able to get the json response from office 365. Another way I tested was using the RestClient plugin of Firefox , with the generated Access Token.

answered Jun 9, 2015 at 10:59

Anupam's user avatar

AnupamAnupam

2313 silver badges14 bronze badges

  • Remove From My Forums
  • Question

  • I have a new error that just popped up today.  For over a year IIS has been successfully directing traffic from
    http://mail.school.com to
    https://mail.school.com/owa.  I was in IIS working on the OAB part under the default website.  I don’t know what I could’ve possibly changed to screw up OWA but I must’ve done something.  I double checked and http traffic is still supposed
    to be redirected to https://mail.school.com/owa. 

    I can get the login screen to pop up when I go to
    https://mail.school.com/owa, but I can’t get my inbox to load after clicking sign in.  This problem is occurring inside and outside the network.

    I’m running Exchange 2010 on a 2008 R2 server.

Answers

  • I think the redirect will work if you do not require SSL on the default web site.  My guess is that requiring SSL does not even give the server a chance to accept the http request before redirecting it to https.


    Outlook Web Access For PDA , OWA For WAP
    www.owa-pda.com
    email a@t leederbyshire d.0.t c.0.m

    • Marked as answer by

      Thursday, June 2, 2011 2:46 PM

Step 1 – Solve Outlook Web Access Error 403

Is Outlook Web Access Error 403 appearing? Would you like to safely and quickly eliminate Outlook Web Access which additionally can lead to a blue screen of death?

When you manually edit your Windows Registry trying to take away the invalid outlook web access error 404 keys you’re taking a authentic chance. Unless you’ve got been adequately trained and experienced you’re in danger of disabling your computer system from working at all. You could bring about irreversible injury to your whole operating system. As very little as just 1 misplaced comma can preserve your Pc from even booting every one of the way by!

Troubleshooting outlook web access error 500 Windows XP, Vista, 7, 8 & 10

Simply because this chance is so higher, we hugely suggest that you make use of a trusted registry cleaner plan like CCleaner (Microsoft Gold Partner Licensed). This system will scan and then fix any Outlook Web Access Error 403 complications.

Registry cleaners automate the entire procedure of finding invalid registry entries and missing file references (including the Web error) likewise as any broken hyperlinks inside of your registry.

Issue with owa error 403

Backups are made immediately prior to each and every scan providing you with the choice of undoing any changes with just one click. This protects you against doable damaging your pc. Another advantage to these registry cleaners is that repaired registry errors will strengthen the speed and performance of one’s procedure drastically.

  • https://www.itsupportguides.com/exchange-2010/exchange-2010-outlook-web-access-error-403-access-is-denied/
  • https://secure.efoldering.com/support/index.php?/ourpartners/Knowledgebase/Article/View/69/22/403-forbidden-error-in-outlook-web-access
  • https://support.microsoft.com/en-us/kb/2839692
  • https://support.microsoft.com/en-us/kb/899384

Cautionary Note: Yet again, for those who are not an state-of-the-art consumer it’s very encouraged that you simply refrain from editing your Windows Registry manually. If you make even the smallest error within the Registry Editor it can result in you some serious issues that may even call for a brand new set up of Windows. Not all difficulties attributable to incorrect Registry Editor use are solvable.

Fixed: error 403 exchange owa

Symptoms of Outlook Web Access Error 403
“Outlook Web Access Error 403” appears and crashes the energetic method window.
Your Personal computer routinely crashes with Outlook Web Access Error 403 when running the exact same system.
“Outlook Web Access Error 403” is shown.
Windows operates sluggishly and responds little by little to mouse or keyboard input.
Your computer periodically “freezes” for the number of seconds in a time.

Will cause of Outlook Web Access Error 403

Corrupt obtain or incomplete set up of Windows Operating System software program.

Corruption in Windows registry from a new Windows Operating System-related application adjust (install or uninstall).

Virus or malware infection which has corrupted Windows method documents or Windows Operating System-related application data files.

Another method maliciously or mistakenly deleted Windows Operating System-related files.

Mistakes this sort of as “Outlook Web Access Error 403” can be brought about by several different elements, so it really is important that you troubleshoot every of the achievable brings about to forestall it from recurring.

Simply click the beginning button.
Variety “command” inside the lookup box… Will not hit ENTER nonetheless!
Although keeping CTRL-Shift in your keyboard, hit ENTER.
You’re going to be prompted that has a authorization dialog box.
Click on Of course.
A black box will open having a blinking cursor.
Variety “regedit” and hit ENTER.
Within the Registry Editor, choose the outlook web access error 404 connected key (eg. Windows Operating System) you wish to back again up.
Within the File menu, choose Export.
Inside the Preserve In list, pick out the folder in which you wish to save the Windows Operating System backup key.
Inside the File Title box, sort a reputation for the backup file, these types of as “Windows Operating System Backup”.
From the Export Vary box, ensure that “Selected branch” is selected.
Click on Help you save.
The file is then saved by using a .reg file extension.
You now use a backup within your outlook web access error 500 related registry entry.

Solution to your outlook web app error 403 problem

There are actually some manual registry editing measures that can not be talked about in this article due to the high chance involved for your laptop or computer method. If you want to understand more then check out the links below.

Additional Measures:

One. Conduct a Thorough Malware Scan

There’s a probability the Outlook 403 Error Web Access error is relevant to some variety of walware infection. These infections are malicious and ready to corrupt or damage and possibly even delete your ActiveX Control Error files. Also, it’s attainable that your Outlook Web Access Error 403 is actually connected to some element of that malicious plan itself.

2. Clean owa error 403 forbidden access is denied Disk Cleanup

The a lot more you employ your computer the extra it accumulates junk files. This comes from surfing, downloading packages, and any sort of usual computer system use. When you don’t clean the junk out occasionally and keep your program clean, it could turn into clogged and respond slowly. That is when you can encounter an Web error because of possible conflicts or from overloading your hard drive.

Once you clean up these types of files using Disk Cleanup it could not just remedy Outlook Web Access Error 403, but could also create a dramatic change in the computer’s efficiency.

Tip: While ‘Disk Cleanup’ is definitely an excellent built-in tool, it even now will not completely clean up Outlook Web discovered on your PC. There are numerous programs like Chrome, Firefox, Microsoft Office and more, that cannot be cleaned with ‘Disk Cleanup’.

Since the Disk Cleanup on Windows has its shortcomings it is extremely encouraged that you use a specialized sort of challenging drive cleanup and privacy safety application like CCleaner. This system can clean up your full pc. If you run this plan after each day (it could be set up to run instantly) you are able to be assured that your Pc is generally clean, often operating speedy, and always absolutely free of any Outlook error associated with your temporary files.

How Disk Cleanup can help outlook web app error something went wrong

1. Click your ‘Start’ Button.
2. Style ‘Command’ into your search box. (no ‘enter’ yet)
3. When holding down in your ‘CTRL-SHIFT’ important go ahead and hit ‘Enter’.
4. You will see a ‘permission dialogue’ box.
5. Click ‘Yes’
6. You will see a black box open up plus a blinking cursor.
7. Variety in ‘cleanmgr’. Hit ‘Enter’.
8. Now Disk Cleanup will start calculating the amount of occupied disk space you will be able to reclaim.
9. Now a ‘Disk Cleanup dialogue box’ seems. There will be a series of checkboxes for you personally to pick. Generally it will likely be the ‘Temporary Files’ that consider up the vast majority of your disk area.
10. Verify the boxes that you want cleaned. Click ‘OK’.

How to repair outlook web app error your request couldn’t be completed

3. System Restore can also be a worthwhile device if you ever get stuck and just desire to get back to a time when your computer system was working ideal. It will work without affecting your pics, paperwork, or other crucial information. You can discover this option with your User interface.

Outlook Web

Manufacturer

Device

Operating System


Outlook Web Access Error 403


4 out of
5

based on
41 ratings.

 

Понравилась статья? Поделить с друзьями:
  • Out of memory ошибка pubg
  • Outlook ошибка 1001
  • Out of memory ошибка matlab
  • Outlook папка локальные ошибки
  • Outlook ошибка 1000