Quantcast
Channel: Exchange Server Development forum
Viewing all 7132 articles
Browse latest View live

ms=xxxx text record

$
0
0

I am the IT Director for the sfwdb.org domain..  I have a premise exchange server 2010 and am migrating to 2016.

I didn't create a ms=xxxxxxx number that I am aware of yet it exists.

where do I get information on how this happened.. it is affecting my users, especially with Active Sync. it seems.

We do not have a corporate Azure or Office 365 account so I don't know how it became part of my DNS record..   Any white papers or help would be appreciated.


Is it possible to filter email using EntryID (PR_ENTRYID) with Outlook REST API? or how to filter emails using binary mapi properties like ENTRY_ID?

$
0
0

We are currently using EWS Managed APIs in our application and looking to migrate to use Outlook REST API approach. I am new to Outlook REST API world and looking for some inputs.

I am trying to fetch email from exchange using PR_ENTRYID with REST API and retrieve its properties, however always facing error like below:

Response status code does not indicate success: 400 (Bad Request).

Endpoint used : https://outlook.office365.com/api/v2.0/me/messages?

Code:

Above endpoint is appended with below filter:

"$filter=SingleValueExtendedProperties/any(ep: ep/PropertyId eq 'Binary 0x0fff' and cast (ep/Value, Edm.Binary) eq '" + entryId + "')";

where entryId is "00000000224A6557586868FH8N6765SZ6F78768686C9786R7658E8686860886D8768676C8B6CV75V7C57S6F5S8FSF7S9F7D86GD7G57D6G86D84000000"

also tried entryId of below form with no luck: "AAAAACJKsh5bmbBdknCdkkjAAdjhV76ssn876fBDJg76jdkBfnnnkbslnKns76229873qHGHGnPPSHSFH+gdgf8BmF8aJdgaAAA=="

Please note that I am able to expand properties as mentioned here, however unable to filter/fetch email with that property. I have followed official documentation at official documentation

Any help is highly appreciated.

Thanks.



sureshh...

Exchange 2010 SP3 on Windows 2012 R2

$
0
0

Hello,

I am trying to install Exchange Server 2010 SP3 on a Windows 2012 R2.

The process always stops when trying to install the Transport Server role , saying that the "MS Exchange Transport" service cannot start.

When I go to services I see that service as "starting" but I can't make it stop or restart it.

This box is also a Domain Controller.

May that be the cause?

Or do you know if there is an issue about Exchange 2010 SP3 with Windows Server 2012 R2 ? maybe a patch needed?

Thanks in advance.


Luis Olías.

EWS, External App and Exchange on prem 2013

$
0
0

Hi,

We are working with a vendor who has a mail app which they were attempting to connect via pop3/imap to our exchange server.  We do not have these items enabled as they are old and suggested they go through EWS.  They've researched the item and asked us to register for an App/API but I'm not sure I'm following their logic.

Our Exchange/AD are on prem.  Do I have to register https://apps.dev.microsoft.com/?referrer=https://azure.microsoft.com/documentation/articles&deeplink=/appList

or is this something they need to do?  Any help anyone can provide would be greatly appreciated as this is beyond my knowledge.

Exchange Server 2016 Managed API for Queue data

$
0
0
I would like to retrieve queue data from Exchange / Edge Server 2016 by using .NET application, so what API or services to be used to achieve this. Can I go with Exchange Web Services or Exchange Server Power Shell (Exchange Management Shell), Please note my .NET application runs from other server. so please help me to choose proper approach?

Stamping archive tag on specific folder via EWS

$
0
0

Hi,

I'm configuring an retentiontag for archiving a specific folder after 2 days.
I'm performing this via EWS.

The goal is to stamp a specific folder (called "TESTFOLDER" that's available within every mailbox), with a personal tag I created.

So far I've modified the script I've found here :
http://blogs.msdn.com/b/akashb/archive/2012/12/07/stamping-archive-policy-tag-using-ews-managed-api-from-powershell-exchange-2010.aspx?CommentPosted=true#commentmessage

1) created a personal tag called "1_Day_move_to_Archive"
2) Changed some settings of the code (EWS version, paths, etc.)
3) configured my account with impersonation rights. (to my own mailbox)
4) Inserted the GUID of the created tag into the script
5) Changed this value "$oFolder.SetExtendedProperty($RetentionFlags, 16)" to "$oFolder.SetExtendedProperty($RetentionFlags, 8)"
16 specifies ExplicitArchiveTag, 8 specifies personaltag >> I tried both settings here

Now when I run the script I don't get any errors thrown, and I get the prompt that the policy is stamped.
When I check afterwards via outlook/owa, I don't see any change however.

I already forced the folder assistant to run, but it also doesn't change anything.

Anyone knows what might be wrong?

 

 


# The script requires the EWS managed API, which can be downloaded here:
# http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1
# This also requires PowerShell 2.0
# Make sure the Import-Module command below matches the DLL location of the API.
# This path must match the install location of the EWS managed API. Change it if needed.

[string]$info = "White"                # Color for informational messages
[string]$warning = "Yellow"            # Color for warning messages
[string]$error = "Red"                 # Color for error messages
[string]$LogFile = "C:\Temp\Log.txt"   # Path of the Log File

function StampPolicyOnFolder($MailboxName)
{
 Write-host "Stamping Policy on folder for Mailbox Name:" $MailboxName -foregroundcolor $info
 Add-Content $LogFile ("Stamping Policy on folder for Mailbox Name:" + $MailboxName)

#Change the user to Impersonate
 $service.ImpersonatedUserId = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,$MailboxName);

 #Search for the folder you want to stamp the property on
 $oFolderView = new-object Microsoft.Exchange.WebServices.Data.FolderView(1)
 $oSearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.FolderSchema]::DisplayName,$FolderName)
 $oFindFolderResults = $service.FindFolders([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot,$oSearchFilter,$oFolderView)

if ($oFindFolderResults.TotalCount -eq 0)
 {
       Write-host "Folder does not exist in Mailbox:" $MailboxName -foregroundcolor $warning
       Add-Content $LogFile ("Folder does not exist in Mailbox:" + $MailboxName)
 }
else
 {
       Write-host "Folder found in Mailbox:" $MailboxName -foregroundcolor $info

       #PR_ARCHIVE_TAG 0x3018 – We use the PR_ARCHIVE_TAG instead of the PR_POLICY_TAG
       $ArchiveTag = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x3018,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Binary);

       #PR_RETENTION_FLAGS 0x301D
       $RetentionFlags = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x301D,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Integer);

       #PR_ARCHIVE_PERIOD 0x301E - We use the PR_ARCHIVE_PERIOD instead of the PR_RETENTION_PERIOD
       $ArchivePeriod = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x301E,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::Integer);

       #Change the GUID based on your policy tag
       $ArchiveTagGUID = new-Object Guid("{7d71ddd7-061a-473e-8b92-033e126bbcb0}");

       #Bind to the folder found
       $oFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$oFindFolderResults.Folders[0].Id)

       #Same as that on the policy - 16 specifies that this is a ExplictArchiveTag -- EDIT (also tried with value 8 > personal tag)
       $oFolder.SetExtendedProperty($RetentionFlags, 16)

       #Same as that on the policy - Since this tag is disabled the Period would be 0 -- We choose 1, since we want to archive after 1 day
       $oFolder.SetExtendedProperty($ArchivePeriod, 2)

       $oFolder.Update()

       Write-host "Retention policy stamped!" -foregroundcolor $info
       Add-Content $LogFile ("Retention policy stamped!")
 }

 $service.ImpersonatedUserId = $null
}


#Change the name of the folder. This is the folder the properties will be stamped on.
$FolderName = "TESTFOLDER"

Import-Module -Name "C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll"

$service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)

# Set the Credentials
$service.Credentials = new-object Microsoft.Exchange.WebServices.Data.WebCredentials("MyAccount","MyPassword","MyDomain")

# Change the URL to point to your cas server
$service.Url = new-object Uri("https://owa.customer.int/EWS/Exchange.asmx")

# Set $UseAutoDiscover to $true if you want to use AutoDiscover else it will use the URL set above
$UseAutoDiscover = $false

#Read data from the UserAccounts.txt.
#This file must exist in the same location as the script.

import-csv UserAccounts.txt | foreach-object {
    $WindowsEmailAddress = $_.WindowsEmailAddress.ToString()

    if ($UseAutoDiscover -eq $true) {
        Write-host "Autodiscovering.." -foregroundcolor $info
        $UseAutoDiscover = $false
        $service.AutodiscoverUrl("$WindowsEmailAddress", {$true})
        Write-host "Autodiscovering Done!" -foregroundcolor $info
        Write-host "EWS URL set to :" $service.Url -foregroundcolor $info

    }
    #To catch the Exceptions generated
    trap [System.Exception]
    {
        Write-host ("Error: " + $_.Exception.Message) -foregroundcolor $error;
        Add-Content $LogFile ("Error: " + $_.Exception.Message);
        continue;
    }
    StampPolicyOnFolder($WindowsEmailAddress)
}

 

Microsoft.Exchange.WebServices.Data.ServiceResponseException: 'The SMTP address has no mailbox associated with it.'

$
0
0

I am trying to send an appointment and i get the above error message :

ExchangeService service = new Microsoft.Exchange.WebServices.Data.ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.Credentials = new WebCredentials("XXXXX", "XXXXX", "XXXXX");

service.Url = new Uri("https://mail.xxxxx.com/ews/exchange.asmx");

System.Net.ServicePointManager.ServerCertificateValidationCallback = (senderX, certificate, chain, sslPolicyErrors) => { return true; };

            Microsoft.Exchange.WebServices.Data.Appointment appointment = new Microsoft.Exchange.WebServices.Data.Appointment(service)
            {
                Subject = "xxxxxx",
                Body = "xxxxxxxxx",
                Start = StartTime,
                End = EndTime,
                Location = Location,

            };
appointment.RequiredAttendees.Add(user.EmailAddress);
appointment.Save(SendInvitationsMode.SendOnlyToAll); // Fail with expection : Microsoft.Exchange.WebServices.Data.ServiceResponseException: 'The SMTP address has no mailbox associated with it.'


how to release IP from hotmail blacklist

$
0
0

I could not send from my outlook email to hot mail account, it show me you ip address is in block list, so  i need to remove it.

after i click on the link to send information from Microsoft, it doesn't work.

https://support.microsoft.com/en-us/getsupport?oaspworkflow=start_1.0.0.0&wfname=capsub&productkey=edfsmsbl3


how to use powershell in exchange development

$
0
0

 

these days, i had see some powershell articles. then i know powershell can use in .net and very easy to manage development. but i have some question as below. i hope someone can help me.

1. if web application and exchange server are not in the same computer. how to use the powershell in the web application  to manage exchange.

2. powershell had some defferent function. eg. it have Exchange manage command in the Exchange command console. it have the AD management in the powershell etc. but i don't know how the translate or include the different functions in the powershell application.

3. powershell had the strong command resourse. but i don't know how to auto run the powershell command and Exchange powershell though the system task. 

 

 

Can we send an email for approval without mail flow rules

$
0
0

I know that we can manage an email sent to a person need to be approved or rejected using Exchange Server Mail Flow rules.

I am trying to achieve the same Approve/Reject email to be sent through Transport Agent code. Is this possible?

Note: Using EX2016

Connect to EWS- Exchange Online

$
0
0

Hi all- I have a web application that uses EWS to process some items in a mailbox.  The mailbox is currently on prem but needs to be moved to exchange online.  When testing with an online mailbox, I'm getting a 401 unauthorized when trying to connect to EWS online.  Here's my code:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
service.Credentials = new WebCredentials("email@company.com", "password");

Like I said, I'm getting a 401.  I've confirmed the email/password combo is correct, I am able to sign in directly O365 webmail with it and check the inbox. Does anyone know what I might be missing?

Error while running the get-app command

$
0
0

Hello Members,

We have recently installed Exchange 2016 CU11 in our environment and it is coexisting with exchange 2010. Everything works fine with exchange but I keep getting this error in exchange management shell when run get-app command.

[PS] C:\Windows\system32>Get-App
Exchange Server doesn't support the requested version.
    + CategoryInfo          : InvalidOperation: (:) [Get-App], OwaExtensionOperationException
    + FullyQualifiedErrorId : [Server=XXXXXXXXXXXX,RequestId=85337632-41c0-4c0b-b03e-eca37963955e,TimeStamp=14/02/2
   019 10:37:09] [FailureCategory=Cmdlet-OwaExtensionOperationException] FDAE7038,Microsoft.Exchange.Management.Exten
  sion.GetApp
    + PSComputerName        : XXXXXXXXXXXXXXXXXXXXXXXXXX

If I login to Exchange admin center and go to Organization --> addins I get the same error Exchange Server doesn't support the requested version.

Tried a lot to look for that error on internet and got very few cases and none of the apply to my scenario

> I am not running exchange Managed webservices API 2.2

> My Arbitration are moved to EXG 2016

Any pointers to sort this out would be appreciated


Rahul Katiyar

EWS in SharePoint 2013 Webpart

$
0
0

Hi all

I have created a simple console application that consumes EWS and so sends appointments.

I have copied the exact function and made it as a SharePoint webpart but it is NOT working giving 503 error

I was testing with the same user

Any help?

EWS API authentication using OAuth (401: UnAuthorized)

$
0
0

Hi,

I am unable to access mailbox of a user, using OAuth.

I followed this article How to: Authenticate an EWS application by using OAuth

I am able to generate a token using 'AuthenticationContext.AcquireTokenAsync()', but then getting 401 error 'UnAuthorized.

Here is my code to generate OAuth token:

public  async Task<string> AcquireTokenAsyncForApplication(string clientId, string clientSecret, string tenantName)
        {
            var ResourceUrl = "https://outlook.office365.com";
            var AuthString = "https://login.microsoftonline.com/" + tenantName;// 
            if (TokenForApplication == null)
            {                
                AuthenticationContext authenticationContext = new AuthenticationContext(AuthString, false);              
                ClientCredential clientCred = new ClientCredential(clientId, clientSecret);
                AuthenticationResult authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, clientCred);// 
                TokenForApplication = authenticationResult.AccessToken;
            }
            return TokenForApplication;
        }

I have registered the app properly, with permission 'Using Exchange Web Services with full access to all mailboxes'

Note: I am using Azure ADAL Lib 3.17.0, so using AcquireTokenAsync() instead of 'AcquireToken()'. I also, dont want to get a pop up, to enter user credentials, instead have to use ClientID (ApplicationID) + ClientSecret(Key).

Regards,

 


Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com

HTML SORT BY COLUMN - Office 365 Health Script

$
0
0

Hello Team

am using the below script to get the office 365 service health check report. However i would like to sort this HTML output as "Service Degradation" as first in the column . i sorted as status ,  Service Degradation is coming in the middle of the output.

Thanks for your help in advance

Please find the below screen shot

                       

==========================================================================

$cred = get-credential



$header = @"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>System Status Report</title>

<style type="text/css">

<!--

body {

background-color: #E0E0E0;

font-family: courier

}

table, th, td {

background-color: white;

border-collapse:collapse;

border: 1px solid black;

padding: 1px

}

-->

</style>

"@



$jsonPayload = (@{userName=$cred.username;password=$cred.GetNetworkCredential().password;} | convertto-json).tostring()



$cookie = (invoke-restmethod -contenttype "application/json" -method Post -uri "https://api.admin.microsoftonline.com/shdtenantcommunications.svc/Register" -body $jsonPayload).RegistrationCookie



$jsonPayload = (@{lastCookie=$cookie;locale="en-US";preferredEventTypes=@(0,1)} | convertto-json).tostring()



$events = (invoke-restmethod -contenttype "application/json" -method Post -uri "https://api.admin.microsoftonline.com/shdtenantcommunications.svc/GetEvents" -body $jsonPayload)



$events | get-member



$events.Events 





#$StatusColor = @{"Service Degradation" = ' bgcolor="RED">"Service Degradation"<';"Service restored"= ' bgcolor="Green">"Service restored"<';"Investigating"= ' bgcolor="RED">"Investigating"<';}



#$StatusColor.Keys | foreach { $events.Events = $events.Events -replace ">$_<",($StatusColor.$_) }



Function GetMessage()



{



$text="";



foreach($message in $($_).Messages)



{



$text=$message.MessageText;



}



return $text;



}





$events.Events |Select-object StartTime, Title, EndTime, LastUpdatedTime, Id, Status, @{Name="Messages";Expression={GetMessage}}| sort-object -Property @{Expression = "Status"; Descending = $False} | ConvertTo-html -head $header -As TABLE | foreach { $PSItem -replace "<td>Service Degradation</td>", "<td style='background-color:#FF8080'>Service Degradation</td>";} |foreach { $PSItem -replace "<td>Investigating</td>", "<td style='background-color:#FFFF00'>Investigating</td>";}|foreach { $PSItem -replace "<td>Service restored</td>", "<td style='background-color:#00FF00'>Service restored</td>";} |foreach { $PSItem -replace"<td>Investigation suspended</td>", "<td style='background-color:#FFFF00'>Investigation suspended</td>";} |foreach { $PSItem -replace "<td>Post-incident report published</td>", "<td style='background-color:#00FFFF'>Post-incident report published</td>";} | Out-File "C:\ramki\OFF_Service_health.html"



$body = Get-Content  "C:\ramki\OFF_Service_health.html" -raw



Send-MailMessage -from "O365healthStatus@nokia.com" -To "", "" -Body $body -BodyAsHtml -SmtpServer "" -Subject " Office365 Service Health"

 .


Create a Search Folder with Powershell

$
0
0

Good Morning.

I need to create a Search Folder in Outlook tosearch mails bigger than 250kb, and I need to do it for all the members of the AD.

All the scripts and examples i've found, using the EWS Managed API, are with VB or C#.
I need to do it with Powershell.

Can anyone help me?

Thank you.


How to get access to /EWS/Exchange.asmx en Exchange Online?

$
0
0
  • Hi everyone,

    Recently in my company, Exchange has been migrated from Exchange On Premise to Exchange Online.

    I have implemented a .Net application to process mails, sent and move them in a shared Mailbox. After migration my app only receive (401) Unauthorized in any case. When I try to login through Explorer (OWA) there is no problem I login successfully.

    Will I need special permissions over  https://<server>/EWS/Exchange.asmx?

    Will I need register my application in Microsoft Cloud, get a token from app and use OAuth to use Exchange Websrvices Online?

    Will I need implement again my application using Office Developer tools for Visual Studio or using Microsoft Graph?

    Thanks and Regards 

Azure hybrid benifit

$
0
0

Hello Expert,

should i have a specific number of licenses to use AHB ?

How to detect corrupted\bad items in an Exchange 2007\2010 mailbox?

$
0
0

Hi,

Is there a way to detect corrupted\bad items in an Exchange 2007\2010 mailbox, may be using EWS or PowerShell + MAPI?

Often Mailbox Moves fails due to corrupted\bad items in mailbox, so we want to know in advance if a mailbox has any bad items. I have searched it many times, but could not find answer. I also have detailed look into:

http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/728141fb-3a9f-4bb3-a202-d11060b11fb5

http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/8d78e08b-4ef9-4b28-a322-98a9dbc436e5

but could not find any answer.

Thanks in anticipation.



Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com

Exchange push notifications without EWS access

$
0
0

I am working on a project which will use near real-time room appointment information from Microsoft Exchange. The customer Exchange server and EWS are private and will not be accessible by the client application.

Is it possible to configure streaming or push notifications with a client that does not have direct access to EWS? Based on what I've read, the client must first subscribe to streaming/push notifications before Exchange will send them.

  • Can subscriptions be created programmatically on the server as long as the server can communicate with the client?
  • If the Exchange server loses connection to the client, would the subscriptions have to be re-created on the server?

Thanks for the help.

Viewing all 7132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>